Dotenv\Loader::__construct PHP Method

__construct() public method

Create a new loader instance.
public __construct ( string $filePath, boolean $immutable = false ) : void
$filePath string
$immutable boolean
return void
    public function __construct($filePath, $immutable = false)
    {
        $this->filePath = $filePath;
        $this->immutable = $immutable;
    }

Usage Example

Example #1
0
 /**
  * Dotenv constructor.
  * @param string $filePath
  */
 public function __construct($filePath)
 {
     parent::__construct($filePath);
     if (file_exists($filePath)) {
         $this->load();
     }
 }
All Usage Examples Of Dotenv\Loader::__construct