class Dotenv
Manages .env files.
VARNAME_REGEX | |
STATE_VARNAME | |
STATE_VALUE |
load($path) Loads one or several .env files. | ||
populate(array $values) Sets values as environment variables (via putenv, $ENV, and $SERVER). | ||
array | parse(string $data, string $path = '.env') Parses the contents of an .env file. |
Loads one or several .env files.
$path |
FormatException | when a file has a syntax error |
PathException | when a file does not exist or is not readable |
Sets values as environment variables (via putenv, $ENV, and $SERVER).
Note that existing environment variables are not overridden.
array | $values | An array of env variables |
Parses the contents of an .env file.
string | $data | The data to be parsed |
string | $path | The original file name where data where stored (used for more meaningful error messages) |
array | An array of env variables |
FormatException | when a file has a syntax error |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Dotenv/Dotenv.html