public function __construct($envfile = null) { if (empty($envfile)) { $envfile = $this->detectEnvFile(); } if (!is_file($envfile) || !is_readable($envfile)) { throw EnvException::invalidFile($envfile); } $this->envfile = $envfile; }