_actionController = $actionController; return $this; } /** * Retrieve current action controller * * @return Zend_Controller_Action */ public function getActionController() { return $this->_actionController; } /** * Retrieve front controller instance * * @return Zend_Controller_Front */ public function getFrontController() { return Zend_Controller_Front::getInstance(); } /** * Hook into action controller initialization * * @return void */ public function init() { } /** * Hook into action controller preDispatch() workflow * * @return void */ public function preDispatch() { } /** * Hook into action controller postDispatch() workflow * * @return void */ public function postDispatch() { } /** * getRequest() - * * @return Zend_Controller_Request_Abstract $request */ public function getRequest() { $controller = $this->getActionController(); if (null === $controller) { $controller = $this->getFrontController(); } return $controller->getRequest(); } /** * getResponse() - * * @return Zend_Controller_Response_Abstract $response */ public function getResponse() { $controller = $this->getActionController(); if (null === $controller) { $controller = $this->getFrontController(); } return $controller->getResponse(); } /** * getName() * * @return string */ public function getName() { $full_class_name = get_class($this); if (strpos($full_class_name, '_') !== false) { $helper_name = strrchr($full_class_name, '_'); return ltrim($helper_name, '_'); } else { return $full_class_name; } } }