/** * The default response method, outputs a full page. */ private function output_full() { if ($this->doRedirect()) { header("Location: http://{$_SERVER['SERVER_NAME']}" . getLink($this->controller->redirect)); } try { $out = TemplateEngine::renderPage("{$this->model}/{$this->command}", array('result' => $this->result, 'errors' => $this->controller->errors)); } catch (Exception $e) { $this->exception = $e; } if ($this->exception) { $out = TemplateEngine::renderPage("error", array('result' => $this->exception)); } return $out; }