Class Dotenv\Dotenv
Inheritance | Dotenv\Dotenv |
---|
Dotenv.
Loads a .env
file in the given directory and sets the environment vars.
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$filePath | string | Dotenv\Dotenv | |
$loader | Dotenv\Loader|null | Dotenv\Dotenv |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Dotenv\Dotenv | |
load() | Load .env file in given directory. |
Dotenv\Dotenv |
overload() | Load .env file in given directory. |
Dotenv\Dotenv |
required() | Required ensures that the specified variables exist, and returns a new Validation object. | Dotenv\Dotenv |
Protected Methods
Method | Description | Defined By |
---|---|---|
getFilePath() | Returns the full path to the file ensuring that it's readable. | Dotenv\Dotenv |
Property Details
Method Details
public void __construct ( $path, $file = '.env' ) | ||
$path | ||
$file |
Returns the full path to the file ensuring that it's readable.
protected string getFilePath ( $path, $file ) | ||
$path | string | |
$file | string |
Load .env
file in given directory.
public void load ( ) |
Load .env
file in given directory.
public void overload ( ) |
Required ensures that the specified variables exist, and returns a new Validation object.
public Dotenv\Validator required ( $variable ) | ||
$variable | mixed |