SandraJinnevall /
ramverk1-module
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Configuration file for DI container. |
||
| 4 | */ |
||
| 5 | return [ |
||
| 6 | "services" => [ |
||
| 7 | "positionKey" => [ |
||
| 8 | "shared" => true, |
||
| 9 | "callback" => function () { |
||
| 10 | $weatherapi = new \Anax\Ip3\Validera3(); |
||
| 11 | $cfg = $this->get("configuration"); |
||
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
Loading history...
|
|||
| 12 | //laddar filen med nyckeln |
||
| 13 | $config = $cfg->load("position_api.php"); |
||
| 14 | //skickar iväg nyckeln in i klassen. För att sen bli hämtbar |
||
| 15 | $weatherapi->getPositionApi($config["config"]["key"]); |
||
| 16 | return $weatherapi; |
||
| 17 | } |
||
| 18 | ], |
||
| 19 | ], |
||
| 20 | ]; |
||
| 21 |