How can I get a controller and an action name in the ErrorController? I mean the controller and action where an exception occurred. For example, if I go to:
/bogusController/bogusAction
I would like to get “bogusController” and “bogusAction”. Calling:
$this->_request->getControllerName();
$this->_request->getActionName();
Returns “error” and “error”.
Original request is stored in error_handler param:
$this->_getParam('error_handler')->request->getControllerName();Some docs:
http://framework.zend.com/manual/en/zend.controller.plugins.html#zend.controller.plugins.standard.errorhandler