Laravel version update
Laravel version update
This commit is contained in:
31
vendor/vlucas/phpdotenv/src/Dotenv.php
vendored
31
vendor/vlucas/phpdotenv/src/Dotenv.php
vendored
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Dotenv;
|
||||
|
||||
use Dotenv\Exception\InvalidPathException;
|
||||
|
||||
/**
|
||||
* This is the dotenv class.
|
||||
*
|
||||
@@ -48,6 +50,21 @@ class Dotenv
|
||||
return $this->loadData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load environment file in given directory, suppress InvalidPathException.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function safeLoad()
|
||||
{
|
||||
try {
|
||||
return $this->loadData();
|
||||
} catch (InvalidPathException $e) {
|
||||
// suppressing exception
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load environment file in given directory.
|
||||
*
|
||||
@@ -86,9 +103,7 @@ class Dotenv
|
||||
*/
|
||||
protected function loadData($overload = false)
|
||||
{
|
||||
$this->loader = new Loader($this->filePath, !$overload);
|
||||
|
||||
return $this->loader->load();
|
||||
return $this->loader->setImmutable(!$overload)->load();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,4 +117,14 @@ class Dotenv
|
||||
{
|
||||
return new Validator((array) $variable, $this->loader);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of environment variables declared inside the 'env' file.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getEnvironmentVariableNames()
|
||||
{
|
||||
return $this->loader->variableNames;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user