예제 #1
0
 function direct($throw = true)
 {
     $id = $this->getRequest()->getParam('message');
     if (!$id) {
         throw new Strass_Controller_Action_Exception_Notice("Message non spécifié.");
     }
     $t = new Commentaires();
     try {
         return $t->findOne($id);
     } catch (Strass_Db_Table_NotFound $e) {
         if ($throw) {
             throw new Strass_Controller_Action_Exception_NotFound("Commentaire #" . $id . " inexistant.");
         } else {
             return null;
         }
     }
 }
예제 #2
0
파일: Photos.php 프로젝트: bersace/strass
 function findCommentaires()
 {
     $t = new Commentaires();
     $parent = $t->findOne($this->commentaires);
     return $parent->findCommentaires();
 }