Re: [PHP-DEV] Method inheritance and parent classes

2006-08-04 Thread Marian Kostadinov
use self::build() or A::build() for that case 2006/8/4, Christian Weiske <[EMAIL PROTECTED]>: Hello all, I recently had a problem that could be solved, but in an ugly way: Class B extended Class A. Both classes define a method with the same name. B called A's constructor, and A called $this->

Re: [PHP-DEV] Method inheritance and parent classes

2006-08-04 Thread Richard Lynch
On Fri, August 4, 2006 11:46 am, Christian Weiske wrote: > I recently had a problem that could be solved, but in an ugly way: > Class B extended Class A. Both classes define a method with the same > name. B called A's constructor, and A called $this->method(). This > executed B::method(), not A::me

Re: [PHP-DEV] Method inheritance and parent classes

2006-08-04 Thread Jason Sweat
On 8/4/06, Christian Weiske <[EMAIL PROTECTED]> wrote: I suggest changing the behavior of php to never call methods of classes that are added by subclasses, only own ones or inherited ones. Thus rendering the entire Template Method design pattern useless? http://home.earthlink.net/~huston2/dp/

[PHP-DEV] Method inheritance and parent classes

2006-08-04 Thread Christian Weiske
Hello all, I recently had a problem that could be solved, but in an ugly way: Class B extended Class A. Both classes define a method with the same name. B called A's constructor, and A called $this->method(). This executed B::method(), not A::method() as you would expect it. build(); }