0
votes

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(Advertiser) -> Forms (AddAdvertiser.php) which is Zend Form.

How can I do this ?? please help!!

2
Please rephrase your question; the two 'answers' so far are simply return questions.Aron Rotteveel

2 Answers

1
votes

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.

2
votes

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).