Documentation

Env

Helper for interacting with environment variables

Tags
author

Jason Napolitano

version
1.0.0
since
1.0.0
license

MIT https://mit-license.org

Table of Contents

dump()  : array<string|int, mixed>
Dump the contents of the $_ENV array
get()  : string|array<string|int, mixed>|bool
Returns an env value
init()  : void
Wrapper function to initialize the built-in env library
set()  : bool
Sets an environment variable

Methods

dump()

Dump the contents of the $_ENV array

public static dump() : array<string|int, mixed>
Return values
array<string|int, mixed>

get()

Returns an env value

public static get(string $key) : string|array<string|int, mixed>|bool
Parameters
$key : string
Return values
string|array<string|int, mixed>|bool

init()

Wrapper function to initialize the built-in env library

public static init(string $path[, string $file = '.env' ]) : void
Parameters
$path : string
$file : string = '.env'
Return values
void

set()

Sets an environment variable

public static set(string $key, mixed $value) : bool
Parameters
$key : string
$value : mixed
Return values
bool

Search results