Esempio n. 1
0
 public function getQuestions()
 {
     if (!isset($this->_ret)) {
         $dbTable = new App_Model_DbTable_Question();
         $this->_ret = $dbTable->getAll();
     }
     return $this->_ret;
 }
Esempio n. 2
0
 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;
 }