diff options
Diffstat (limited to 'public/index.php')
| -rw-r--r-- | public/index.php | 11 |
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 | ||
| 57 | define('CURRENT_PAGE', htmlspecialchars($request->query->get('page') ?? '')); | 57 | define('CURRENT_PAGE', htmlspecialchars($request->query->get('page') ?? '')); |
| 58 | 58 | ||
| 59 | Router::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 | } |
| 65 | catch(Throwable $e){ | 70 | catch(Throwable $e){ |
| 66 | $response = new JsonResponse([ | 71 | $response = new JsonResponse([ |
