[PHP] Re: runtime access to static variable

2008-12-18 Thread ceo
> Unfortunately, in the inherited DeployTask::execute(), "self::$STEPS" > does not refer to UpdateTask::$STEPS, it refers to DeployTask::$STEPS Use parent::$STEPS and call it done? Yes, I know, if you add another layer of class in between, then it's not parent:: anymore, but it seems a bit

[PHP] Re: runtime access to static variable

2008-12-17 Thread Nathan Rixham
Jack Bates wrote: this does beg the question why don't you know the classname at runtime.. seems to be a slight design flaw and may make sense for you to post the full problem (you must have chosen to implement this for a reason..) The full problem is: I started off with a "DeployTask" for dep

[PHP] Re: runtime access to static variable

2008-12-17 Thread Jack Bates
> this does beg the question why don't you know the classname at runtime.. > seems to be a slight design flaw and may make sense for you to post the > full problem (you must have chosen to implement this for a reason..) The full problem is: I started off with a "DeployTask" for deploying a new i

[PHP] Re: runtime access to static variable

2008-12-16 Thread Nathan Rixham
Jack Bates wrote: How do I access a static variable when I do not know the name of the class until runtime? I have the following example PHP: ket% cat test.php class Test { public static $STEPS = array( 'foo', 'bar'); } $className = 'Test'; var_dump($className::$STEPS); k

[PHP] Re: runtime access to static variable

2008-12-16 Thread Nathan Rixham
Jack Bates wrote: How do I access a static variable when I do not know the name of the class until runtime? I have the following example PHP: ket% cat test.php class Test { public static $STEPS = array( 'foo', 'bar'); } $className = 'Test'; var_dump($className::$STEPS); k