theEmelie /
ramverk1-modul
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Configuration file for DI container. |
||
| 4 | */ |
||
| 5 | return [ |
||
| 6 | // Services to add to the container. |
||
| 7 | "services" => [ |
||
| 8 | "apiDarkSky" => [ |
||
| 9 | "shared" => true, |
||
| 10 | "callback" => function () { |
||
| 11 | $darkSkyModel = new \Anax\Models\Weather(); |
||
| 12 | |||
| 13 | // Load the configuration files |
||
| 14 | $cfg = $this->get("configuration"); |
||
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
Loading history...
|
|||
| 15 | $config = $cfg->load("apiTokens.php"); |
||
| 16 | $darkSkyModel->setKeys($config['config']); |
||
| 17 | return $darkSkyModel; |
||
| 18 | } |
||
| 19 | ], |
||
| 20 | ], |
||
| 21 | ]; |
||
| 22 |