class RoutingMiddleware implements MiddlewareInterface (View source)

A routing HTTP component

Properties

protected RouterInterface $router
protected PackageManager $packageManager

Methods

ResponseInterface
process(ServerRequestInterface $request, RequestHandlerInterface $next)

Resolve a route for the request

Details

ResponseInterface process(ServerRequestInterface $request, RequestHandlerInterface $next)

Resolve a route for the request

Stores the resolved route values in the HTTP request attributes to pass them to other components. They can be accessed via ServerRequestInterface::getAttribute(ServerRequestAttributes::ROUTING_RESULTS);

Parameters

ServerRequestInterface $request
RequestHandlerInterface $next

Return Value

ResponseInterface