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