Env
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, bool $alternative = false)
Get value from $_ENV[...] as boolean
static float
float(string $name, float $alternative = 0.0)
Get value from $_ENV[...] as float
static int
int(string $name, int $alternative = 0)
Get value from $_ENV[...] as integer
static
fillInVariables()
No description
Details
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, bool $alternative = false)
Get value from $_ENV[...] as boolean
- Returns bool(true) for '1', 'true', 'on', and 'yes'.
- Returns bool(false) for '0', 'false', 'off', and 'no'.
static float
float(string $name, float $alternative = 0.0)
Get value from $_ENV[...] as float
static int
int(string $name, int $alternative = 0)
Get value from $_ENV[...] as integer
static
fillInVariables()
No description