public function indexAction()
 {
     $this->view->title = "My Posts";
     $this->view->headTitle($this->view->title);
     $posts = new Application_Model_DbTable_Posts();
     $this->view->posts = $posts->fetchAll();
 }
 public function showAction()
 {
     // TODO Auto-generated PostController::indexAction() default action
     $posts = new Application_Model_DbTable_Posts();
     $data = $posts->fetchAll();
     $this->view->data = $data->toArray();
 }
 public function deleteAction()
 {
     $id = $this->_request->getParam('id', 0);
     if ($id > 0) {
         $post = new Application_Model_DbTable_Posts();
         $post->deletePost($id);
     }
     $this->_redirect('/post/index');
 }