php-mezzio-ph-modern.Factory.php.mustache Maven / Gradle / Ivy
get(EmitterInterface::class),
$container->get(ServerRequestInterface::class),
static fn(\Throwable $error): ResponseInterface => $errorMiddleware->handleError($error)
);
$application = new Application(
$container->get(MiddlewareFactory::class),
$pipeline,
$container->get(RouteCollector::class),
$runner
);
$application->pipe($errorMiddleware);
$application->pipe(RouteMiddleware::class);
$application->pipe(MethodNotAllowedMiddleware::class);
$application->pipe(DispatchMiddleware::class);
$application->pipe(NotFoundHandler::class);
return $application;
}
protected static function getErrorMiddleware(ContainerInterface $container): Middleware\InternalServerError
{
return $container->get(Middleware\InternalServerError::class);
}
}