src/Handlers/SimpleHtmlExceptionRequestHandler.php
public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $path = realpath(__DIR__ . '/../../templates');

        $engine = new Engine($path);

        $contents = $engine->render('simple');

        $response = $this->factory
            ->createResponse(500)
            ->withHeader('Content-type', 'text/html');

        $response->getBody()->write($contents);

        return $response;
    }
public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $path = realpath(__DIR__ . '/../../templates');

        $engine = new Engine($path);

        $contents = $engine->render('simple');

        $response = $this->factory
            ->createResponse(500)
            ->withHeader('Content-type', 'text/html');

        $response->getBody()->write($contents);

        return $response;
    }
public function handle ( ServerRequestInterface $ request ) : ResponseInterface { $ path = realpath ( __DIR__ . '/../../templates' ) ; $ engine = new Engine ( $ path ) ; $ contents = $ engine -> render ( 'simple' ) ; $ response = $ this -> factory -> createResponse ( 500 ) -> withHeader ( 'Content-type' , 'text/html' ) ; $ response -> getBody ( ) -> write ( $ contents ) ; return $ response ; }
Return a simple html response for the exception.

@param \Psr\Http\Message\ServerRequestInterface $request
@return \Psr\Http\Message\ResponseInterface
Return a simple html response for the exception .