PHP Class 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.
显示文件
Open project: zendframework/zend-expressive
Public Methods
Method |
Description |
|
__invoke ( Interop\Container\ContainerInterface $container ) |
|
|
Private Methods
Method Details
public __invoke ( Interop\Container\ContainerInterface $container ) |
$container |
Interop\Container\ContainerInterface |
|