class RouterMiddleware

Properties

protected RouteCollection $routes
protected Dispatcher $dispatcher

Methods

__construct(RouteCollection $routes)

Create the middleware instance.

Response
__invoke(ServerRequestInterface $request, ResponseInterface $response, callable $out = null)

Dispatch the given request to our route collection.

getDispatcher()

No description

Details

__construct(RouteCollection $routes)

Create the middleware instance.

Parameters

RouteCollection $routes

Response __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $out = null)

Dispatch the given request to our route collection.

Parameters

ServerRequestInterface $request
ResponseInterface $response
callable $out

Return Value

Response

Exceptions

RouteNotFoundException

protected getDispatcher()