PHP Класс Zend\Expressive\WhoopsErrorHandler

Extends from TemplatedErrorHandler in order to provide templated error and 404 pages; for exceptions, it delegates to Whoops to provide a user-friendly interface for navigating an exception stack trace.
См. также: http://filp.github.io/whoops/
Наследование: extends TemplatedErrorHandler
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Whoops\Run $whoops, PrettyPageHandler $whoopsHandler = null, Zend\Expressive\Template\TemplateRendererInterface $renderer = null, null | string $template404 = 'error/404', null | string $templateError = 'error/error', Psr\Http\Message\ResponseInterface $originalResponse = null )

Защищенные методы

Метод Описание
handleException ( Throwable $exception, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface Handle an exception.

Приватные методы

Метод Описание
prepareWhoopsHandler ( Psr\Http\Message\RequestInterface $request, PrettyPageHandler $handler ) Prepare the Whoops page handler with a table displaying request information

Описание методов

__construct() публичный Метод

public __construct ( Whoops\Run $whoops, PrettyPageHandler $whoopsHandler = null, Zend\Expressive\Template\TemplateRendererInterface $renderer = null, null | string $template404 = 'error/404', null | string $templateError = 'error/error', Psr\Http\Message\ResponseInterface $originalResponse = null )
$whoops Whoops\Run
$whoopsHandler Whoops\Handler\PrettyPageHandler
$renderer Zend\Expressive\Template\TemplateRendererInterface
$template404 null | string
$templateError null | string
$originalResponse Psr\Http\Message\ResponseInterface

handleException() защищенный Метод

Calls on prepareWhoopsHandler() to inject additional data tables into the generated payload, and then injects the response with the result of whoops handling the exception.
protected handleException ( Throwable $exception, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) : Psr\Http\Message\ResponseInterface
$exception Throwable
$request Psr\Http\Message\RequestInterface
$response Psr\Http\Message\ResponseInterface
Результат Psr\Http\Message\ResponseInterface