如何在ErrorController中获取控制器和操作名称

Ric*_*nop 0 php zend-framework

如何在ErrorController中获取控制器和操作名称?我指的是发生异常的控制器和动作.例如,如果我去:

/bogusController/bogusAction
Run Code Online (Sandbox Code Playgroud)

我想得到"bogusController"和"bogusAction".呼叫:

$this->_request->getControllerName();
$this->_request->getActionName();
Run Code Online (Sandbox Code Playgroud)

返回"错误"和"错误".

Dis*_*dev 6

原始请求存储在error_handler参数中: $this->_getParam('error_handler')->request->getControllerName();

一些文档: http://framework.zend.com/manual/en/zend.controller.plugins.html#zend.controller.plugins.standard.errorhandler