diff options
| author | polo <ordipolo@gmx.fr> | 2026-07-26 13:42:25 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2026-07-26 13:42:25 +0200 |
| commit | 2c89c0ec184c0ed76562c899722bb3615cd83add (patch) | |
| tree | c0006cf58164533ae34ec113d683e8a5f106098d /public | |
| parent | 0458c5dc4a8e36737f45d6813af24b08f0958688 (diff) | |
| download | cms-2c89c0ec184c0ed76562c899722bb3615cd83add.tar.gz cms-2c89c0ec184c0ed76562c899722bb3615cd83add.tar.bz2 cms-2c89c0ec184c0ed76562c899722bb3615cd83add.zip | |
choix d'une stratégie par type d'objet, suppression des isset inutiles, suppression de $validated
Diffstat (limited to 'public')
| -rw-r--r-- | public/index.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/public/index.php b/public/index.php index 2ab799b..19011d1 100644 --- a/public/index.php +++ b/public/index.php | |||
| @@ -45,21 +45,16 @@ if(IS_ADMIN){ | |||
| 45 | // remplit la BDD initiale, ne fonctionne que si la BDD est vide | 45 | // remplit la BDD initiale, ne fonctionne que si la BDD est vide |
| 46 | DatabaseSettingUp::run($entityManager); | 46 | DatabaseSettingUp::run($entityManager); |
| 47 | 47 | ||
| 48 | $request = Request::createFromGlobals(); | ||
| 49 | |||
| 50 | 48 | ||
| 51 | /* -- partie 2: routage et contrôleurs -- */ | 49 | /* -- partie 2: routage et contrôleurs -- */ |
| 52 | 50 | $request = Request::createFromGlobals(); | |
| 53 | define('CURRENT_PAGE', htmlspecialchars($request->query->get('page') ?? '')); | 51 | define('CURRENT_PAGE', htmlspecialchars($request->query->get('page') ?? '')); |
| 54 | 52 | ||
| 55 | //Router::dispatch($request, $entityManager); | ||
| 56 | //$response = Router::dispatch($request, $entityManager); | ||
| 57 | |||
| 58 | $router = new Router($request, $entityManager); | 53 | $router = new Router($request, $entityManager); |
| 59 | $response = $router->dispatch(); | 54 | $response = $router->dispatch(); |
| 60 | $response->send(); | 55 | $response->send(); |
| 61 | 56 | ||
| 62 | // gestion des erreurs | 57 | // avec gestion des erreurs |
| 63 | /*try{ | 58 | /*try{ |
| 64 | $response = $router->dispatch(); | 59 | $response = $router->dispatch(); |
| 65 | } | 60 | } |
