Beispiel #1
0
 public function indexAction()
 {
     $comments = new Application_Model_Comments();
     //Pega todos os comentarios
     $listaComments = $comments->fetchAll();
     //Pega o primeiro comentario
     $comment = $listaComments->getRow(1);
     //Busca o post que tem o comentario
     $listaPost = $comment->findParentRow('Application_Model_Posts');
     $this->view->post = $listaPost;
 }
Beispiel #2
0
 public function retrieveAction()
 {
     $comments = new Application_Model_Comments();
     $data = $comments->fetchAll();
     $this->view->data = $data;
 }