Blixter /
weather-module
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Configuration file for DI container. |
||
| 4 | */ |
||
| 5 | return [ |
||
| 6 | // Services to add to the container. |
||
| 7 | "services" => [ |
||
| 8 | "ipgeo" => [ |
||
| 9 | "active" => false, |
||
| 10 | "shared" => true, |
||
| 11 | "callback" => function () { |
||
| 12 | $ipgeo = new \Blixter\IpGeolocation\IpGeoModel(); |
||
| 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("keys.php"); |
||
| 16 | $config = $config["config"] ?? null; |
||
| 17 | $ipgeo->setApi($config['ipStackApiKey']); |
||
| 18 | return $ipgeo; |
||
| 19 | }, |
||
| 20 | ], |
||
| 21 | ], |
||
| 22 | ]; |
||
| 23 |