container->get(RouterInterface::class); $log = $this->container->get(LogContainer::class); try { $response = $router->dispatch($request); } catch (\Throwable $e) { $response = new GenericResponse( $e->getMessage(), StatusEnum::NOT_FOUND ); //$response = $container->get(RoutesConfig::class)->getExceptionRoute()->getController()::exception($e); } http_response_code($response->getStatus()->value); foreach ($response->getHeaders() as $header) { header($header); } echo $response->getBody(); echo '
Log:'; } }
'; foreach ($log->getLogs() as $log) { echo sprintf('%s
', $log); } echo '