1 | <?php |
||
2 | /** |
||
3 | * Configuration file for DI container. |
||
4 | */ |
||
5 | return [ |
||
6 | // Services to add to the container. |
||
7 | "services" => [ |
||
8 | "keystore" => [ |
||
9 | "shared" => true, |
||
10 | //"callback" => "\Anax\Response\Response", |
||
11 | "callback" => function () { |
||
12 | $keystore = new \Lefty\KeyStore\KeyStore(); |
||
13 | $keystore->setDI($this); |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
![]() |
|||
14 | |||
15 | // Load the configuration files |
||
16 | $cfg = $this->get("configuration"); |
||
17 | $config = $cfg->load("keystore.php"); |
||
18 | $keys = $config["config"]["keys"]; |
||
19 | // var_dump($keys); |
||
20 | // $keys = require ANAX_INSTALL_PATH . "/config/keystore.php"; |
||
21 | $keystore->setKeys($keys); |
||
22 | // var_dump($keystore); |
||
23 | |||
24 | return $keystore; |
||
25 | } |
||
26 | ], |
||
27 | ], |
||
28 | ]; |
||
29 |