use GameScan\Core\Exceptions\EnvironmentException;
5
6
class Environment
7
{
8
9
private $path = null;
10
private $hasLoadValues = false;
11
12
2
public function __construct($path = null, $filename = ".env")
13
{
14
2
if ($path === null) {
15
$path = __DIR__ . '/../../../../..';
16
}
17
18
2
if (!file_exists($path . DIRECTORY_SEPARATOR . $filename)) {
19
2
throw new EnvironmentException($path . DIRECTORY_SEPARATOR . $filename . " is not exist. Please create an environment file before using this feature");