class NotFoundHandler implements RequestHandlerInterface (View source)

A simple handler that sends a 404 response.

Methods

__construct(ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory)

NotFoundHandler constructor.

ResponseInterface
handle(ServerRequestInterface $request)

{@inheritdoc}

Details

__construct(ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory)

NotFoundHandler constructor.

Parameters

ResponseFactoryInterface $responseFactory The factory used to generate the response
StreamFactoryInterface $streamFactory The factory used to generate the body for the response

ResponseInterface handle(ServerRequestInterface $request)

{@inheritdoc}

Parameters

ServerRequestInterface $request

Return Value

ResponseInterface