class ErrorHandler implements RequestHandlerInterface (View source)

A simple handler that sends a 500 error 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