public function perform($get, $post, $files) { $url = $this->defaultUrl; $req = new MovicoRequest($get, $post, $files); if ($req->isRenderUrl()) { $renderUrl = $req->getUrl(); $url = empty($renderUrl) ? $url : $renderUrl; } elseif ($req->isActionUrl()) { $url = $req->getPreviousUrl(); $this->updateModel($req); $actionResult = $this->executeAction($req); if (!is_null($actionResult)) { $url = $actionResult; } } $forward = new ViewForward($url); Context::initParams($forward->getParams()); return $forward; }
private function getViewRoot(ViewForward $forward) { //if($this->cacheEnabled && $this->getViewCache()->has($url)) { // return $this->getViewCache()->get($url); //} $viewName = $forward->getView(); $location = $this->getViewLocation($viewName); if (!file_exists($location)) { $location = $this->getViewLocation($this->settings->getErrorPage()); if (!file_exists($location)) { throw new ViewNotExistsException($view); } } $doc = $this->xmlFactory->fromFile($location); $result = $doc->getRootElement(); while ($result->getName() == "composition") { $result = $this->parseTemplate($result); } $result = $this->parseView($forward->getUrl(), $result); //if($this->cacheEnabled) { // $this->getViewCache()->put($url, $result); //} return $result; }