hi,
i need some help here.
how can i access a static property of a subclass.
i have an abstract class which will be extended...
each extending class will have a static property that will store an array like this:
each class will have these two properties. But each key of the $_multiLevelArr ay will store diferent arrays (where i have array(...))
that is why i cannot simpy store the array in the abstract class.
however i would like to be able to set something like this from the abstract class:
is this "child::" valid in php5?
or i should have the same method replicated on each extending class?
any suggestion?
cheers
i need some help here.
how can i access a static property of a subclass.
i have an abstract class which will be extended...
each extending class will have a static property that will store an array like this:
Code:
protected static $_multiLevelArray = array('one'=> [B]array(...)[/B], 'two'=> [B]array(...)[/B])
protected static $_finalArray;
that is why i cannot simpy store the array in the abstract class.
however i would like to be able to set something like this from the abstract class:
Code:
protected static setChildStaticProperty($key){
child::$_finalArray = child::$_multiLevelArray[$key];
}
or i should have the same method replicated on each extending class?
any suggestion?
cheers
Comment