All Downloads are FREE. Search and download functionalities are using the official Maven repository.

php-mezzio-ph.Factory.php.mustache Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show newest version
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