NYCPHP Meetup

NYPHP.org

[nycphp-talk] static methods in derived classes

David Sklar sklar at sklar.com
Thu Sep 23 10:49:11 EDT 2004


Chris Bielanski wrote:
> Pardon my Delphi leanings, that's the bulk of my OO experience... That said:
> 
> Does this mean that Dave should be overriding the eat() method in the child,
> the body of which is merely calling parent::eat()?

That just postpones the problem -- when Lunch::eat() calls Meal::eat(), 
then Meal::eat() complains it can't find the prepare() method.

I think the bug that Joseph posted is the definitive answer here -- it's 
a design decision/limitation in the way self:: works in the engine.

David




More information about the talk mailing list