Ejemplo n.º 1
0
 /**
  * _forward
  *
  * Calls to another action in the same controller
  * Updates the view pointing to the new action to enable its execution
  *
  * @param string $action
  *
  * @return mixed
  */
 protected function _forward($action)
 {
     $controller = $this->_request->getController();
     $viewPath = 'application/packages/' . str_replace('\\', DIRECTORY_SEPARATOR, $this->_package) . '/views/scripts/' . implode('/', array_slice(explode('\\', $this->_namespace), 1)) . '/';
     $this->_view->setFile($viewPath . $controller . DIRECTORY_SEPARATOR . $action . '.phtml');
     $actionName = $action . 'Action';
     return $this->{$actionName}();
 }
Ejemplo n.º 2
0
 protected function _defaultErrorLayout()
 {
     $layout = new Phtml($this->_container->getResource('ErrorLayoutPath') . DIRECTORY_SEPARATOR . 'exception.phtml');
     $layout->setRouter($this->_container->getResource('Router'));
     $layout->setViewHelperBroker($this->_container->getResource('ViewHelperBroker'));
     $layout->setCache($this->_container->getResource('Cache'));
     return $layout;
 }