class CallbackHandler implements RequestHandlerInterface (View source)

A handler that calls the given callback to generate the response.

Methods

__construct(callable $callback)

CallbackHandler constructor.

ResponseInterface
handle(ServerRequestInterface $request)

{@inheritdoc}

Details

__construct(callable $callback)

CallbackHandler constructor.

Parameters

callable $callback The callback to call with the request

ResponseInterface handle(ServerRequestInterface $request)

{@inheritdoc}

Parameters

ServerRequestInterface $request

Return Value

ResponseInterface