Ejemplo n.º 1
0
 function execute($caveID, $caves)
 {
     // create View
     $view = new Suggestions_Index_View($_SESSION['player']->language, $_SESSION['player']->template);
     // create Model
     $model = new Suggestions_Model();
     if ($this->error) {
         $view->setError($this->error);
     }
     return array($view->getTitle(), $view->getContent($model->getCount()));
 }
Ejemplo n.º 2
0
Archivo: Send.php Proyecto: norter/Game
 function execute($caveID, $caves)
 {
     // create View
     $view = new Suggestions_Index_View($_SESSION['player']->language, $_SESSION['player']->template);
     // create Model
     $model = new Suggestions_Model();
     foreach ($_POST as $key => $val) {
         if (strpos($key, "suggestion") !== FALSE) {
             $model->addSuggestion($val);
         }
     }
     if ($this->error) {
         $view->setError($this->error);
     }
     return array($view->getTitle(), $view->getContent($model->getCount()));
 }