1 | <?php |
||
9 | class Module implements InitProviderInterface |
||
10 | { |
||
11 | /** @var string */ |
||
12 | private $constant = 'APPLICATION_PATH'; |
||
13 | |||
14 | /** @var string */ |
||
15 | private $variable = 'APPLICATION_PATH'; |
||
16 | |||
17 | /** @var string */ |
||
18 | private $file = '.env'; |
||
19 | |||
20 | /** |
||
21 | * Module constructor. |
||
22 | * @param string $constant |
||
23 | * @param string $variable |
||
24 | * @param string $file |
||
25 | */ |
||
26 | 4 | public function __construct($constant = null, $variable = null, $file = null) |
|
40 | |||
41 | /** |
||
42 | * @param ModuleManagerInterface $moduleManager |
||
43 | */ |
||
44 | 1 | public function init(ModuleManagerInterface $moduleManager) |
|
50 | |||
51 | /** |
||
52 | * @return mixed[] |
||
53 | * @throws \Abacaphiliac\ZendPhpDotEnv\Exception\InvalidConstantPathException |
||
54 | * @throws \Abacaphiliac\ZendPhpDotEnv\Exception\InvalidEnvironmentVariablePathException |
||
55 | * @throws \Abacaphiliac\ZendPhpDotEnv\Exception\InvalidWorkingDirectoryPathException |
||
56 | */ |
||
57 | 4 | public function loadEnvironmentVariables() |
|
72 | } |
||
73 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: