Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function initialize( |
||
17 | IApp $app, |
||
18 | IErrorHandler $errorHandler, |
||
19 | IContainer $container |
||
20 | ) { |
||
21 | if ($app instanceof IHttpApp && $app->getDebug()) { |
||
22 | $jsonErrorHandler = new JsonErrorHandler($app, $errorHandler); |
||
23 | $jsonErrorHandler->enableErrorHandling(); |
||
24 | $jsonErrorHandler->enableExceptionHandling(); |
||
25 | |||
26 | $container->set(JsonErrorHandler::class, $jsonErrorHandler); |
||
27 | } |
||
28 | } |
||
29 | } |
||
30 |