class EnvironmentLoader (View source)

Loads environment variables from .env files Loosely based on https://github.com/vlucas/phpdotenv/blob/master/src/Loader.php

Methods

public
array|null
loadFile(string $path, bool $overload = false)

Load environment variables from .env file

Details

array|null loadFile(string $path, bool $overload = false)

Load environment variables from .env file

Parameters

string $path

Path to the file

bool $overload

Set to true to allow vars to overload. Recommended to leave false.

Return Value

array|null

List of values parsed as an associative array, or null if not loaded If overloading, this list will reflect the final state for all variables