I have an Callback-Method setStatusCallback(). I want to override the Action-Method statusAction() which is placed on my User_IndexController-Class. I know that I can override a Callback-Method to setStatusCallback() using
setStatusCallback(array(&$obj, 'statusAction'));
However, when I write
$obj = new User_IndexController();
setStatusCallback(array(&$obj, 'statusAction'));
this does not work, because User_IndexController() needs $request. How can I get an instance of User_IndexController? I don’t know how to handle this $request.
I don’t understand why you have to create an instance of a controller object yourself, Zend_Application should do it for you. But if you need to create it yourself, try:
You can simply create an instance of a
Zend_Controller_Request_Httpobject and pass it to theZend_Controller_Actionconstructor with no special requirements. Hope that helps.