[nycphp-talk] Static variables, self:: and abstract classes
Andrew Kamm
akamm at demicooper.com
Wed Jun 7 08:38:59 EDT 2006
>> That's basically the problem I'm having -- your example redeclares a new
>> function in the child class.
>
> No. You misunderstand. You don't need to redeclare each function.
> Consider "m" to be like a constructor. I would have used __construct(),
> but they don't get called in static mode. So, instead of setting the
> property values via instantiation in your example, manually set them in
> the fake constructor. Then manually call the "constructor" before making
> any other static calls on your inherited static methods.
Ah .... I see now. Fantastic. I just did a little trial run and I think
that'll work great. I'm diving back into the actual class files right now
to work it out.
thanks!
--
Andrew Kamm
More information about the talk
mailing list