Exemplo n.º 1
0
 /**
  * Call another action within the same controller 
  * @param string $actionName
  */
 public function callAction($actionName)
 {
     $controllerName = MvcReg::getControllerName();
     $moduleName = MvcReg::getModuleName();
     $actionViewClassName = $this->getActionViewClassName($moduleName, $controllerName, $actionName);
     $actionViewFile = $this->getActionViewFile($moduleName, $controllerName, $actionName);
     MvcReg::setActionViewClassName($actionViewClassName);
     MvcReg::setActionViewFile($actionViewFile);
     $action = $actionName . self::ACTION_POSTFIX;
     $this->setDefaultView();
     $this->{$action}();
 }
Exemplo n.º 2
0
 /**
  * Remove the default action view.
  */
 public function removeDefaultActionView()
 {
     MvcReg::setActionViewClassName(null);
     MvcReg::setActionViewFile(null);
 }