aboutsummaryrefslogtreecommitdiff
path: root/public/index.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-06-06 00:32:43 +0200
committerpolo <ordipolo@gmx.fr>2026-06-06 00:32:43 +0200
commit3988f3eb48bafb36b370eecc75a87e804f57c09d (patch)
tree8c0afd691eaa3f6985681f0793d898e56a7a57c8 /public/index.php
parent2c6070444b6cf79908653e776d6e4464cd6a5ac9 (diff)
downloadcms-3988f3eb48bafb36b370eecc75a87e804f57c09d.tar.gz
cms-3988f3eb48bafb36b370eecc75a87e804f57c09d.tar.bz2
cms-3988f3eb48bafb36b370eecc75a87e804f57c09d.zip
classe Router, flash errors récupérées dans ViewDirector, exceptions buggées, utilisation de Response à certains endroits
Diffstat (limited to 'public/index.php')
-rw-r--r--public/index.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/public/index.php b/public/index.php
index 591fff7..0f0a7e9 100644
--- a/public/index.php
+++ b/public/index.php
@@ -55,4 +55,18 @@ $request = Request::createFromGlobals();
55/* -- partie 2: routage et contrôleurs -- */ 55/* -- partie 2: routage et contrôleurs -- */
56 56
57define('CURRENT_PAGE', htmlspecialchars($request->query->get('page') ?? '')); 57define('CURRENT_PAGE', htmlspecialchars($request->query->get('page') ?? ''));
58require '../src/service/router.php'; \ No newline at end of file 58
59Router::dispatch($request, $entityManager);
60
61// futur bon code après correction du routeur
62/*try{
63 $response = Router::dispatch($request, $entityManager);
64}
65catch(Throwable $e){
66 $response = new JsonResponse([
67 'success' => false,
68 'message' => 'Erreur interne'
69 ], 500);
70 // mieux utiliser une classe ErrorHandler qui gère les différents types d'erreur
71}
72$response->send();*/ \ No newline at end of file