Hello'); } #[Route('/error')] public function error(): ResponseInterface { return new GenericResponse('error', StatusEnum::NOT_FOUND); } #[Route('/hello')] public function hello(): ResponseInterface { return new GenericResponse('Hello World!'); } #[Route('/routes')] public function routes(RouterConfig $config): ResponseInterface { $routes = implode('
', array_map( fn($route) => $route->getRoute()->path, $config->getRoutes() )); return new GenericResponse($routes); } #[Route('/world/{name}')] public function world(string $name): ResponseInterface { return new GenericResponse("Hello $name!"); } }