Env
class Env (View source)
Class Env
Methods
__construct(string|null $filename = null)
Env constructor.
static void
configure(string|null $filename = null)
Load env file
static void
reset()
Reset the singleton state. Intended for test setup/teardown so a fresh configure() can load a different env file; not meant for production code.
static bool
isLoaded()
No description
static Env
getInstance()
Get the Env instance
static mixed
get(string $key, mixed $default = 'null')
No description
static bool
set(string $key, mixed $value)
No description
static array
all()
No description
static mixed
__callStatic(string $name, array $arguments)
Handle dynamic calls to the class methods.
Details
__construct(string|null $filename = null)
Env constructor.
static void
configure(string|null $filename = null)
Load env file
static void
reset()
Reset the singleton state. Intended for test setup/teardown so a fresh configure() can load a different env file; not meant for production code.
static bool
isLoaded()
No description
static Env
getInstance()
Get the Env instance
static mixed
get(string $key, mixed $default = 'null')
No description
static bool
set(string $key, mixed $value)
No description
static array
all()
No description
static mixed
__callStatic(string $name, array $arguments)
Handle dynamic calls to the class methods.