29 lines
574 B
PHP
29 lines
574 B
PHP
<?php
|
|
|
|
class Blog_IndexController extends Fiktiv_Controller_Action
|
|
{
|
|
public function indexAction()
|
|
{
|
|
$this->_forward('latest');
|
|
}
|
|
|
|
public function latestAction()
|
|
{
|
|
$this->view->posts = $this->dataService->BlogPost->findAll();
|
|
}
|
|
|
|
public function archiveAction()
|
|
{
|
|
|
|
}
|
|
|
|
public function readAction()
|
|
{
|
|
$this->view->post = $this->dataService->BlogPost->findById($this->_getParam('id', null));
|
|
|
|
if (!$this->view->post)
|
|
$this->_redirect(array('action' => 'latest'));
|
|
|
|
|
|
}
|
|
}
|