Environment
class Environment
Allow accessing environment variables
Methods
static bool
has(string $key)
Determine if an environment variable exists.
static string
get(string $key)
Get a specific environment variable.
static string
getOr(string $key, string $default)
Get a specific environment variable, or a default value if it doesn't exist.
Details
at line 20
static bool
has(string $key)
Determine if an environment variable exists.
at line 31
static string
get(string $key)
Get a specific environment variable.
at line 46
static Option
tryGet(string $key)
Try to get an environment value
at line 64
static string
getOr(string $key, string $default)
Get a specific environment variable, or a default value if it doesn't exist.
If the variable is set with an empty string value, this method will consider it as a legitimate value and so return an empty string.