Slim: How could I use container in errorHandler

Created on 31 Jul 2018  Â·  1Comment  Â·  Source: slimphp/Slim

I define my own errorHandler, but I can not access the App and Container instance。

Thanks

Most helpful comment

You could probably just inject it with something like this:

$app = new App([
'errorHandler' => function(ContainerInterface $container){
        return new ErrorHandler($container);
    }
);

>All comments

You could probably just inject it with something like this:

$app = new App([
'errorHandler' => function(ContainerInterface $container){
        return new ErrorHandler($container);
    }
);
Was this page helpful?
0 / 5 - 0 ratings

Related issues

codeguy picture codeguy  Â·  3Comments

arokettu picture arokettu  Â·  3Comments

snoopy72 picture snoopy72  Â·  4Comments

adambro picture adambro  Â·  3Comments

basuke picture basuke  Â·  3Comments