class Env

Properties

static $env_vars

Methods

static 
set(string $key, mixed $value)

Set an environment variable.

static mixed
get(string $key, mixed $default = null)

Get an environment variable.

static 
setFromArray(array $env)

Set environment variables from array.

Details

at line 13
static set(string $key, mixed $value)

Set an environment variable.

Parameters

string $key

The variable name

mixed $value

The variable value

at line 25
static mixed get(string $key, mixed $default = null)

Get an environment variable.

Parameters

string $key

The variable name

mixed $default

Default value if $key not found

Return Value

mixed

The variable value

at line 34
static setFromArray(array $env)

Set environment variables from array.

Parameters

array $env

An array containing the key - values pairs