PHP 클래스 Zend\Expressive\Container\WhoopsErrorHandlerFactory
Register this factory as the service
Zend\Expressive\FinalHandler in
the container of your choice.
This factory has optional dependencies on the following services:
- 'Zend\Expressive\Template\TemplateRendererInterface', which should return an
implementation of that interface. If not present, the error handler
will not create templated responses.
- 'config' (which should return an array or array-like object with a
"zend-expressive" top-level key, and an "error_handler" subkey,
containing the configuration for the error handler).
This factory has required dependencies on the following services:
- Zend\Expressive\Whoops, which should return a Whoops\Run instance.
- Zend\Expressive\WhoopsPageHandler, which should return a
Whoops\Handler\PrettyPageHandler instance.
Configuration should look like the following:
'zend-expressive' => [
'error_handler' => [
'template_404' => 'name of 404 template',
'template_error' => 'name of error template',
],
]
If any of the keys are missing, default values will be used.
The whoops configuration can contain:
'whoops' => [
'json_exceptions' => [
'display' => true,
'show_trace' => true,
'ajax_only' => true,
]
]
All values are booleans; omission of any implies boolean false.
파일 보기
프로젝트 열기: zendframework/zend-expressive
공개 메소드들
메소드 |
설명 |
|
__invoke ( Interop\Container\ContainerInterface $container ) |
|
|
비공개 메소드들
메소드 상세
public __invoke ( Interop\Container\ContainerInterface $container ) |
$container |
Interop\Container\ContainerInterface |
|