1 | <?php |
||
2 | /** |
||
3 | * Configuration file for DI container. |
||
4 | */ |
||
5 | return [ |
||
6 | // Services to add to the container. |
||
7 | "services" => [ |
||
8 | "flash" => [ |
||
9 | "shared" => true, |
||
10 | "callback" => function () { |
||
11 | $cfg = $this->configuration->load("flash.php"); |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
![]() |
|||
12 | $template = $cfg["config"]["template"]; |
||
13 | $region = $cfg["config"]["region"] ?? null; |
||
14 | |||
15 | $flash = new \Faxity\DI\Flash($template, $region); |
||
16 | $flash->setDI($this); |
||
17 | $flash->render(); |
||
18 | |||
19 | return $flash; |
||
20 | }, |
||
21 | ], |
||
22 | ], |
||
23 | ]; |
||
24 |