DispatchRequestHandler
final class DispatchRequestHandler implements RequestHandlerInterface (View source)
Reuses a trusted pre-match or matches the request, publishes its RouteMatch, and delegates to route middleware.
It honors a dispatch-only path attribute while keeping the original request URI available to the selected controller and its middleware.
Methods
__construct(Router $router, ControllerResolver $resolver, MiddlewareResolver $middlewareResolver, HttpInstrumentation|null $diagnostics = null, ScopedContainerInterface|null $scope = null)
Initializes the routing dispatch boundary for one application runtime.
handle(ServerRequestInterface $request)
Dispatches the canonical match while binding the matched request in its scope.
ResponseInterface
Details
__construct
__construct(Router $router, ControllerResolver $resolver, MiddlewareResolver $middlewareResolver, HttpInstrumentation|null $diagnostics = null, ScopedContainerInterface|null $scope = null)
Initializes the routing dispatch boundary for one application runtime.
handle
ResponseInterface
handle(ServerRequestInterface $request)
Dispatches the canonical match while binding the matched request in its scope.