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