OllieJohnsson /
weather
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Configuration file for weather service. |
||
| 4 | */ |
||
| 5 | return [ |
||
| 6 | // Services to add to the container. |
||
| 7 | "services" => [ |
||
| 8 | "darkSky" => [ |
||
| 9 | // "active" => true, |
||
| 10 | "shared" => false, |
||
| 11 | "callback" => function () { |
||
| 12 | $curl = new \Oliver\Curl\Curl(); |
||
| 13 | $darkSky = new \Oliver\DarkSky\DarkSky($curl); |
||
| 14 | $darkSky->setDI($this); |
||
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
Loading history...
|
|||
| 15 | |||
| 16 | // Load the configuration files |
||
| 17 | $cfg = $this->get("configuration"); |
||
| 18 | $config = $cfg->load("darkSky/config.php"); |
||
| 19 | $darkSky->configure($config["config"]); |
||
| 20 | return $darkSky; |
||
| 21 | } |
||
| 22 | ], |
||
| 23 | ], |
||
| 24 | ]; |
||
| 25 |