Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | "callback" => function () { |
||
11 | |||
12 | // Load the configuration files |
||
13 | $cfg = $this->get("configuration"); |
||
|
|||
14 | $config = $cfg->load("apikey_sample.php"); // Update with your own apikey file |
||
15 | $config = $config["config"] ?? null; |
||
16 | |||
17 | // Create and configure new weather-object |
||
18 | $weather = new \Mahw17\Weather\Weather($config); |
||
19 | |||
20 | // Create and configure new ip-object and add to weather service |
||
21 | $weather->setIp(new \Mahw17\Weather\Ip($config)); |
||
22 | |||
23 | return $weather; |
||
24 | } |
||
28 |