aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/index.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/public/index.php b/public/index.php
index 0f0a7e9..cdcfd34 100644
--- a/public/index.php
+++ b/public/index.php
@@ -56,11 +56,16 @@ $request = Request::createFromGlobals();
56 56
57define('CURRENT_PAGE', htmlspecialchars($request->query->get('page') ?? '')); 57define('CURRENT_PAGE', htmlspecialchars($request->query->get('page') ?? ''));
58 58
59Router::dispatch($request, $entityManager); 59//Router::dispatch($request, $entityManager);
60//$response = Router::dispatch($request, $entityManager);
60 61
61// futur bon code après correction du routeur 62$router = new Router($request, $entityManager);
63$response = $router->dispatch();
64$response->send();
65
66// gestion des erreurs
62/*try{ 67/*try{
63 $response = Router::dispatch($request, $entityManager); 68 $response = $router->dispatch();
64} 69}
65catch(Throwable $e){ 70catch(Throwable $e){
66 $response = new JsonResponse([ 71 $response = new JsonResponse([