PHP Class Zend\Expressive\Container\WhoopsFactory

Register this factory as the service Zend\Expressive\Whoops in the container of your choice. This service depends on two others: - 'config' (which should return an array or array-like object with a "whoops" key, containing the configuration for whoops). - 'Zend\Expressive\WhoopsPageHandler', which should return a Whoops\Handler\PrettyPageHandler instance to register on the whoops instance. 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 ) : Whoops\Run Create and return an instance of the Whoops runner.

Private Methods

Method Description
registerJsonHandler ( Whoops\Run $whoops, array | ArrayAccess $config ) If configuration indicates a JsonResponseHandler, configure and register it.

Method Details

__invoke() public method

Create and return an instance of the Whoops runner.
public __invoke ( Interop\Container\ContainerInterface $container ) : Whoops\Run
$container Interop\Container\ContainerInterface
return Whoops\Run