BackendRouteInitialization implements MiddlewareInterface
Injects the Router and tries to match the current request with a configured backend route. The available backend routes were added in the corresponding dependency injection factories, which load and process the module and route configuration files
- Configuration/Backend/{,Ajax}Routes.php
- Configuration/Backend/Modules.php
from each extension.
After this middleware, a "Route" object is available as attribute in the Request object. Additionally, the request handler (e.g. a controller) is available as "target" in the PSR-7 request object.
Table of Contents
Interfaces
- MiddlewareInterface
Properties
Methods
- __construct() : mixed
- process() : ResponseInterface
- Resolve the &route (or &M) GET/POST parameter, and also resolves a Route object
Properties
$requestContextFactory read-only
protected
RequestContextFactory
$requestContextFactory
$router read-only
protected
Router
$router
$uriBuilder read-only
protected
UriBuilder
$uriBuilder
Methods
__construct()
public
__construct(Router $router, UriBuilder $uriBuilder, RequestContextFactory $requestContextFactory) : mixed
Parameters
- $router : Router
- $uriBuilder : UriBuilder
- $requestContextFactory : RequestContextFactory
process()
Resolve the &route (or &M) GET/POST parameter, and also resolves a Route object
public
process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $handler : RequestHandlerInterface