class Env (View source)

Methods

static mixed
entry(string $name, string|null $alternative = null)

Get value from $_ENV[...]. If not exists or empty string return aternate value

static bool
bool(string $name)

Get value from $_ENV[...] as boolean

static float
float(string $name, $alternative = 0.0)

Get value from $_ENV[...] as float

static int
int(string $name, $alternative = 0)

Get value from $_ENV[...] as integer

Details

static mixed entry(string $name, string|null $alternative = null)

Get value from $_ENV[...]. If not exists or empty string return aternate value

Parameters

string $name
string|null $alternative

Return Value

mixed

static bool bool(string $name)

Get value from $_ENV[...] as boolean

Parameters

string $name

Return Value

bool

static float float(string $name, $alternative = 0.0)

Get value from $_ENV[...] as float

Parameters

string $name
$alternative

Return Value

float

static int int(string $name, $alternative = 0)

Get value from $_ENV[...] as integer

Parameters

string $name
$alternative

Return Value

int