EnvLoader
in package
Table of Contents
- $appDirPath : string
- The application directory path.
- $httpHost : string
- The HTTP host.
- $instance : EnvLoader|null
- init() : EnvLoader
- Get the single instance of the class.
- load() : Dotenv
- Load environment variables from specified files.
- __construct() : mixed
- Private constructor to prevent instantiation.
Properties
$appDirPath
The application directory path.
private
string
$appDirPath
$httpHost
The HTTP host.
private
string
$httpHost
$instance
private
static EnvLoader|null
$instance
= null
Methods
init()
Get the single instance of the class.
public
static init(string $appDirPath, string $httpHost) : EnvLoader
Parameters
- $appDirPath : string
- $httpHost : string
Return values
EnvLoader —load()
Load environment variables from specified files.
public
load(array<string|int, mixed> $envFiles, EnvType $envType) : Dotenv
Parameters
- $envFiles : array<string|int, mixed>
- $envType : EnvType
Return values
Dotenv —__construct()
Private constructor to prevent instantiation.
private
__construct(string $appDirPath, string $httpHost) : mixed
Parameters
- $appDirPath : string
- $httpHost : string