How to access abstract class methods in zend form
Hii..
How can I access abstract class methods in zend form?
I have the following class in library folder
abstract class Adx_Controller_Standard extends Zend_Controller_Action { public function getSelectedAdvertiser() { return value; }
}
I want to access getSelectAdvertiser() function in Module(A开发者_C百科dvertiser) -> Forms (AddAdvertiser.php) which is Zend Form.
How can I do this ?? please help!!
can you elaborate? you could use reflection to interrogate the class.
you have to extend an abstract class and overload any abstract methods - if its the abstract methods you are interested in then unfortunately there is nothing to be interested in - you HAVE to write your concrete implementation for them yourself at some point (or rather these methods WILL be written in a child object somewhere along the line).
Can you be more specific here? Do you mean how can you access an abstract method from another class in a Zend_Form subclass?
You cannot instantiate abstract classes directly but you can access them if they are declared static or if you subclass the abstract class and then instantiate it.
加载中,请稍侯......
精彩评论