NYCPHP Meetup

NYPHP.org

[nycphp-talk] Static variables, self:: and abstract classes

Daniel Convissor danielc at analysisandsolutions.com
Tue Jun 6 19:06:06 EDT 2006


On Tue, Jun 06, 2006 at 04:21:36PM -0500, Andrew Kamm wrote:
> 
> 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.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list