class ApplicationProvider extends AbstractEntryProvider (View source)

Provides the default dependencies required by the application.

Methods

getApplication(ContainerInterface $container)

Returns the configured web application.

getMiddlewareHandler(ContainerInterface $container)

Returns the default middleware stack that is run for every request.

getNotFoundHandler(ContainerInterface $container)

Returns the request handler used for 404 responses.

getErrorHandlerMiddleware(ContainerInterface $container)

Returns the middleware used to route exceptions to the error handler.

getErrorHandler(ContainerInterface $container)

Returns the request handler for handling exception responses.

getRouterMiddleware(ContainerInterface $container)

Returns the router middleware used to route requests to appropriate handlers.

getHttpClient()

Returns the http client used to communicate to the browser.

getHttpFactory()

Returns the factory used create requests and responses.

RequestFactoryInterface
getRequestFactory()

Returns the standard Request factory.

ResponseFactoryInterface
getResponseFactory()

Returns the standard Response Factory.

ServerRequestFactoryInterface
getServerRequestFactory()

Returns the standard ServerRequest Factory.

StreamFactoryInterface
getStreamFactory()

Returns the standard Stream Factory.

UploadedFileFactoryInterface
getUploadedFileFactory()

Returns the standard UploadedFile Factory.

UriFactoryInterface
getUriFactory()

Returns the standard Uri Factory.

Details

Application getApplication(ContainerInterface $container)

Returns the configured web application.

Parameters

ContainerInterface $container The container used to resolve dependencies

Return Value

Application The configured web application

MiddlewareHandler getMiddlewareHandler(ContainerInterface $container)

Returns the default middleware stack that is run for every request.

Parameters

ContainerInterface $container The container used to resolve dependencies

Return Value

MiddlewareHandler The default middleware stack that is run for every request

NotFoundHandler getNotFoundHandler(ContainerInterface $container)

Returns the request handler used for 404 responses.

Parameters

ContainerInterface $container The container used to resolve dependencies

Return Value

NotFoundHandler Rhe request handler used for 404 responses

ErrorHandlerMiddleware getErrorHandlerMiddleware(ContainerInterface $container)

Returns the middleware used to route exceptions to the error handler.

Parameters

ContainerInterface $container The container used to resolve dependencies

Return Value

ErrorHandlerMiddleware The middleware used to route exceptions to the error handler

ErrorHandler getErrorHandler(ContainerInterface $container)

Returns the request handler for handling exception responses.

Parameters

ContainerInterface $container The container used to resolve dependencies

Return Value

ErrorHandler The request handler for handling exception responses

RouterMiddleware getRouterMiddleware(ContainerInterface $container)

Returns the router middleware used to route requests to appropriate handlers.

Parameters

ContainerInterface $container The container used to resolve dependencies

Return Value

RouterMiddleware The router middleware used to route requests to appropriate handlers

HttpClient getHttpClient()

Returns the http client used to communicate to the browser.

Return Value

HttpClient The http client used to communicate to the browser

HttpFactoryInterface getHttpFactory()

Returns the factory used create requests and responses.

Return Value

HttpFactoryInterface The factory for creating requests and responses

RequestFactoryInterface getRequestFactory()

Returns the standard Request factory.

Return Value

RequestFactoryInterface The standard Request factory

ResponseFactoryInterface getResponseFactory()

Returns the standard Response Factory.

Return Value

ResponseFactoryInterface The standard Response Factory

ServerRequestFactoryInterface getServerRequestFactory()

Returns the standard ServerRequest Factory.

Return Value

ServerRequestFactoryInterface The standard ServerRequest Factory

StreamFactoryInterface getStreamFactory()

Returns the standard Stream Factory.

Return Value

StreamFactoryInterface The standard Stream Factory

UploadedFileFactoryInterface getUploadedFileFactory()

Returns the standard UploadedFile Factory.

Return Value

UploadedFileFactoryInterface The standard UploadedFile Factory

UriFactoryInterface getUriFactory()

Returns the standard Uri Factory.

Return Value

UriFactoryInterface The standard Uri Factory