php-mezzio-ph.Factory.php.mustache Maven / Gradle / Ivy
get(EmitterInterface::class),
$container->get(ServerRequestInterface::class),
static function(\Throwable $error) use ($errorMiddleware) : ResponseInterface
{
return $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);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy