/** * @throws HTTP_Exception_404 * * view new item */ public function action_view() { $id = $this->request->param('id'); $id = Security::encode_php_tags(HTML::chars($id)); $news = new Model_New(); $data = $news->getNew($id); if ($data) { $content = View::factory($this->itemNewsView); $content->bind('data', $data); $this->template->content = $content; } else { throw new HTTP_Exception_404('File not found!'); } }