Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -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;
}
}