RE: Abstract Legacy question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Andy Pieters wrote:
> This is kinda hard to say in words, so I'll give a little example
> 
> Class A
>   function x
>     calls function guid
>   function y
>   function z
>   function guid
> Class B extends A
>  function y
>    calls function x
>  function guid
> 
> So what I'm wondering is when class B calls its function Y, 
> it will in its 
> turn call function X (which is not overloaded in class B) and 
> function X 
> calls the function GUID from which class?  Class A or Class B?

class B.  Which makes sense if you think about the code, which will look
like

$this->guid()

... and '$this' is a 'B' 

Rob

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux