params = $params; } public function display() { http_response_code(404); parent::display(); } public function getContent() { if (is_null($this->html)) { $this->html = $this->generatePage(); } return $this->html; } private function generatePage() { $params = $this->params; $page['title'] = $this->title; $page['content'] = $this->content; $template = new Template($params['templates'], $params['theme']['templates']); return $template->render('error', ['page' => $page, 'params' => $params]); } }