| 110 | return $this->handler; |
| 111 | } |
| 112 | |
| 113 | if (is_array($this->handler)) { |
| 114 | [$controllerClass, $method] = $this->handler; |
| 115 | return fn($request) => (new $controllerClass())->$method($request); |
| 116 | } |
| 117 | |
| 118 | if (is_string($this->handler) && str_contains($this->handler, '@')) { |
| 119 | if ($resolver) { |
| 120 | [$instance, $method] = $resolver->resolve($this->handler); |
| 60 | try { |
| 61 | $mainRouter = new MainRouter(); |
| 62 | $routes = $mainRouter->getRouter(); |
| 63 | |
| 64 | // Route dispatch et |
| 65 | $result = $mainRouter->dispatch(); |
| 66 | if ($result) { |
| 67 | echo $result; |
| 68 | } |
| 69 | |
| 70 | } catch (\Exception $e) { |