public function getQuestions() { if (!isset($this->_ret)) { $dbTable = new App_Model_DbTable_Question(); $this->_ret = $dbTable->getAll(); } return $this->_ret; }
public function newquestionAction() { $questionGateway = new App_Model_DbTable_Question(); $question = $questionGateway->getNew(); if (isset($_POST['save'])) { unset($_POST['save']); $question->updateData($_POST); // obviously this is not a good idea, but with little time ... $question->save(); $this->redirect("/question/id/{$question->id}"); } $this->view->question = $question; }