function direct($throw = true) { $slug = $this->getRequest()->getParam('photo'); $t = new Photos(); try { $p = $t->findBySlug($slug); } catch (Strass_Db_Table_NotFound $e) { if ($throw) { throw new Strass_Controller_Action_Exception_NotFound("Photo " . $slug . " inconnue"); } else { return null; } } $this->setBranche($p); return $p; }