class DispatchRoute implements MiddlewareInterface

Properties

protected RouteCollection $routes
protected Dispatcher $dispatcher

Methods

__construct(RouteCollection $routes)

<p>Create the middleware instance.</p>

ResponseInterface
process(ServerRequestInterface $request, RequestHandlerInterface $handler)

<p>Dispatch the given request to our route collection.</p>

getDispatcher()

No description

Details

__construct(RouteCollection $routes)

<p>Create the middleware instance.</p>

Parameters

RouteCollection $routes

ResponseInterface process(ServerRequestInterface $request, RequestHandlerInterface $handler)

<p>Dispatch the given request to our route collection.</p>

Parameters

ServerRequestInterface $request
RequestHandlerInterface $handler

Return Value

ResponseInterface

Exceptions

MethodNotAllowedException
RouteNotFoundException

protected getDispatcher()