Environment
in package
This class will allow us to get environment variables setted on the OS.
Tags
Table of Contents
get() | Returns the data stored on the given environment key. | : mixed|null |
---|---|---|
getAll() | Returns all the data stored as OS environment variables. | : array<string|int, mixed> |
set() | Sets a environment key with the given value. | : void |
Methods
get()
Returns the data stored on the given environment key.
public
static get(string $key) : mixed|null
Parameters
- $key : string
-
Name of the environment key you want to get.
Return values
mixed|null —getAll()
Returns all the data stored as OS environment variables.
public
static getAll() : array<string|int, mixed>
Return values
array<string|int, mixed> —set()
Sets a environment key with the given value.
public
static set(string $key, string $value) : void
Parameters
- $key : string
- $value : string