\duncan3dc\EnvJsonEnvironment

Summary

Methods
Properties
Constants
has()
get()
set()
__construct()
No public properties found
No constants found
getVars()
No protected properties found
N/A
loadVars()
$vars
$path
N/A

Properties

$vars

$vars : array

Type

array — Internal cache of environment variables.

$path

$path : string

Type

string — The path to the file.

Methods

has()

has(string  $var) : boolean

Check if a specific environment variable exists.

Parameters

string $var

The name of the variable to check

Returns

boolean

get()

get(string  $var) : mixed

Get a specific environment variable.

Parameters

string $var

The name of the variable to retrieve

Returns

mixed

set()

set(string  $var, string|integer|boolean  $value) : $this

Override an environment variable.

Parameters

string $var

The name of the variable to set

string|integer|boolean $value

The value of the environment variable

Returns

$this

__construct()

__construct(string  $path) 

Create a new instance.

Parameters

string $path

The location of the file

getVars()

getVars() : array

Get all defined environment variables.

Returns

array

loadVars()

loadVars() : null

Get all defined environment variables.

Returns

null