Conditions | 4 |
Paths | 6 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
41 | private function load() |
||
42 | { |
||
43 | if ($this->loaded) { |
||
44 | return; |
||
45 | } |
||
46 | try { |
||
47 | // Load variables from .env file |
||
48 | $loader = new Dotenv($this->directory, $this->fileName); |
||
49 | |||
50 | if ($this->overload) { |
||
51 | $loader->overload(); |
||
52 | } else { |
||
53 | $loader->load(); |
||
54 | } |
||
55 | } catch (InvalidPathException $e) { |
||
56 | // If .env file doesn't exist, silently continue |
||
57 | } |
||
58 | $this->loaded = true; |
||
59 | } |
||
60 | } |
||
61 |