EnvironmentInterface

Interface

Reads process environment variables without binding callers to Composer APIs.

Table of Contents

Methods

get()

Reads an environment variable or, when no name is provided, the current environment map.

 : array<string, string>|string|null
Methods

get()

Public

Reads an environment variable or, when no name is provided, the current environment map.

public get([ string|null  $name = null][, string|null  $default = null]) : array<string, string>|string|null
Parameters
$name : string|null = null

Description

the environment variable name, or null to read the current environment map

$default : string|null = null

Description

the value returned when the named variable is not defined

Return values
array<string, string>|string|null

Description

the environment map, variable value, or default fallback