/** * execute * * @param XCube_Controller &$controller * * @return void **/ public function execute(&$controller) { if ($this->_createAction() === false) { $this->doActionNotFoundError(); die; } if ($this->mAction->prepare() === false) { $this->doPreparationError(); die; } if ($this->mAction->hasPermission() === false) { $this->doPermissionError(); die; } $viewStatus = Trpg_Utils::getEnv('REQUEST_METHOD') == 'POST' ? $this->mAction->execute() : $this->mAction->getDefaultView(); if (in_array($viewStatus, $this->_mAllowViewNames)) { $methodName = 'executeView' . ucfirst($viewStatus); if (is_callable(array($this->mAction, $methodName))) { $render = $this->getRenderTarget(); $this->mAction->{$methodName}($render); $render->setAttribute('xoops_pagetitle', $this->mAction->getPagetitle()); $this->mAction->setHeaderScript(); } } }