コード例 #1
0
ファイル: ThingsController.php プロジェクト: Nerutiz/trades
 public function indexAction()
 {
     $mapper = new Application_Model_ThingsMapper();
     $things = $mapper->fetchAll(Zend_Auth::getInstance()->getStorage()->read()->id);
     $this->view->things = $things;
     $this->view->mapper = $mapper;
 }
コード例 #2
0
ファイル: TradesController.php プロジェクト: Nerutiz/trades
 public function thingAction()
 {
     $mapper = new Application_Model_ThingsMapper();
     if ($this->getRequest()->getParam('itemid')) {
         if (Zend_Auth::getInstance()->hasIdentity()) {
             $this->view->thing = $mapper->selectThing($this->getRequest()->getParam('itemid'), new Application_Model_Things());
             $this->view->images = $mapper->findimage($this->getRequest()->getParam('itemid'));
             $this->view->mythings = $mapper->fetchAll(Zend_Auth::getInstance()->getStorage()->read()->id);
         } else {
             $this->view->thing = $mapper->selectThing($this->getRequest()->getParam('itemid'), new Application_Model_Things());
             $this->view->images = $mapper->findimage($this->getRequest()->getParam('itemid'));
         }
     }
 }