1 | <?php |
||
8 | class Module |
||
9 | { |
||
10 | /** @var string */ |
||
11 | private $constant = 'APPLICATION_PATH'; |
||
12 | |||
13 | /** @var string */ |
||
14 | private $variable = 'APPLICATION_PATH'; |
||
15 | |||
16 | /** @var string */ |
||
17 | private $file = '.env'; |
||
18 | |||
19 | /** |
||
20 | * Module constructor. |
||
21 | * @param string $constant |
||
22 | * @param string $variable |
||
23 | * @param string $file |
||
24 | */ |
||
25 | public function __construct($constant = null, $variable = null, $file = null) |
||
39 | |||
40 | /** |
||
41 | * @param ModuleManager $moduleManager |
||
42 | */ |
||
43 | public function init(ModuleManager $moduleManager) |
||
49 | |||
50 | /** |
||
51 | * @return mixed[] |
||
52 | * @throws \Abacaphiliac\ZendPhpDotEnv\Exception\InvalidConstantPathException |
||
53 | * @throws \Abacaphiliac\ZendPhpDotEnv\Exception\InvalidEnvironmentVariablePathException |
||
54 | * @throws \Abacaphiliac\ZendPhpDotEnv\Exception\InvalidWorkingDirectoryPathException |
||
55 | */ |
||
56 | public function loadEnvironmentVariables() |
||
71 | } |
||
72 |
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: