Zend\Expressive\TemplatedErrorHandler::create404 PHP Method

create404() private method

If we have a template renderer composed, renders the 404 template into the response.
private create404 ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\RequestInterface
$response Psr\Http\Message\ResponseInterface
return Psr\Http\Message\ResponseInterface
    private function create404(Request $request, Response $response)
    {
        if ($this->renderer) {
            $response->getBody()->write($this->renderer->render($this->template404, ['uri' => $request->getUri()]));
        }
        return $response->withStatus(404);
    }