final class ControllerRequestHandler implements RequestHandlerInterface (View source)

Terminates a matched middleware pipeline by invoking its selected controller action.

Methods

Binds controller resolution to one immutable route match.

ResponseInterface
handle(ServerRequestInterface $request)

Delegates the request to the controller selected by the bound route match.

ResponseInterface

Details

__construct

__construct(ControllerResolver $resolver, RouteMatch $match)

Binds controller resolution to one immutable route match.

Parameters

ControllerResolver $resolver
RouteMatch $match

handle

ResponseInterface handle(ServerRequestInterface $request)

Delegates the request to the controller selected by the bound route match.

Parameters

ServerRequestInterface $request

Return Value

ResponseInterface