예제 #1
0
 private function routeCommand($request)
 {
     $command = $request->shiftCommand();
     if (empty($command)) {
         $command = 'Student';
     }
     $className = 'tailgate\\Controller\\User\\' . $command;
     if (!class_exists($className)) {
         \Server::pageNotFound();
         exit;
     }
     $commandObject = new $className($this->getModule());
     return $commandObject;
 }
예제 #2
0
 public function getHtmlView($data, \Request $request)
 {
     $command = $request->getVar('command');
     switch ($command) {
         case 'confirm':
             $content = $this->confirmWinner();
             break;
         default:
             echo \Server::pageNotFound();
             exit;
     }
     $view = new \View\HtmlView($content);
     return $view;
 }
예제 #3
0
 public function getHtmlView($data, \Request $request)
 {
     if (!$request->isVar('command')) {
         $command = 'landing';
     } else {
         $command = $request->getVar('command');
     }
     switch ($command) {
         case 'landing':
             $content = $this->landing();
             break;
         default:
             echo \Server::pageNotFound();
             exit;
             break;
     }
     $view = new \View\HtmlView($content);
     return $view;
 }