MAPG-10 adapt index.php to the new view-controller concept
add GetNewPosition's route to index.php
This commit is contained in:
parent
88e8a4e9e4
commit
e0d65b6e27
@ -8,9 +8,16 @@ switch($url) {
|
||||
case '/':
|
||||
$controller = new MapGuesser\Controller\GuessController();
|
||||
break;
|
||||
case '/getNewPosition.json':
|
||||
$controller = new MapGuesser\Controller\GetNewPosition();
|
||||
break;
|
||||
default:
|
||||
echo 'Error 404';
|
||||
die;
|
||||
}
|
||||
|
||||
echo $controller->render();
|
||||
$view = $controller->run();
|
||||
|
||||
header('Content-Type: ' . $view->getContentType() . '; charset=UTF-8');
|
||||
|
||||
echo $view->render();
|
||||
|
Loading…
Reference in New Issue
Block a user