HttpDispatcher
in package
implements
HttpDispatcherInterface
Class HttpDispatcher
Tags
Interfaces, Classes and Traits
- HttpDispatcherInterface
- Interface HttpDispatcherInterface
Table of Contents
- $httpContextReader : HttpContextReaderInterface
- $httpViewControllerFactory : HttpViewControllerFactoryInterface
- __construct() : mixed
- Initializes the http dispatcher.
- dispatch() : mixed
- Dispatches the current http request.
Properties
$httpContextReader
protected
HttpContextReaderInterface
$httpContextReader
$httpViewControllerFactory
protected
HttpViewControllerFactoryInterface
$httpViewControllerFactory
Methods
__construct()
Initializes the http dispatcher.
public
__construct(HttpContextReaderInterface $httpContextReader, HttpViewControllerFactoryInterface $httpViewControllerFactory) : mixed
Parameters
- $httpContextReader : HttpContextReaderInterface
- $httpViewControllerFactory : HttpViewControllerFactoryInterface
Tags
Return values
mixed —dispatch()
Dispatches the current http request.
public
dispatch(HttpContextInterface $httpContext) : mixed
If the http request is valid and can get handled by a controller class, the controllers ::proceed method is invoked by the dispatcher. Otherwise, the method will throw a missing controller name exception.
Parameters
- $httpContext : HttpContextInterface
-
Object which holds information about the current http context.