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; }
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')); } } }