EnvVarProcessor
in package
implements
EnvVarProcessorInterface
Tags
Table of Contents
Interfaces
- EnvVarProcessorInterface
- The EnvVarProcessorInterface is implemented by objects that manage environment-like variables.
Properties
- $container : ContainerInterface
- $loadedVars : array<string|int, mixed>
- $loaders : Traversable<string|int, EnvVarLoaderInterface>
Methods
- __construct() : mixed
- getEnv() : mixed
- Returns the value of the given variable as managed by the current instance.
- getProvidedTypes() : array<string, string>
Properties
$container
private
ContainerInterface
$container
$loadedVars
private
array<string|int, mixed>
$loadedVars
= []
$loaders
private
Traversable<string|int, EnvVarLoaderInterface>
$loaders
Methods
__construct()
public
__construct(ContainerInterface $container[, Traversable<string|int, EnvVarLoaderInterface>|null $loaders = null ]) : mixed
Parameters
- $container : ContainerInterface
- $loaders : Traversable<string|int, EnvVarLoaderInterface>|null = null
getEnv()
Returns the value of the given variable as managed by the current instance.
public
getEnv(string $prefix, string $name, Closure $getEnv) : mixed
Parameters
- $prefix : string
-
The namespace of the variable; when the empty string is passed, null values should be kept as is
- $name : string
-
The name of the variable within the namespace
- $getEnv : Closure
-
A closure that allows fetching more env vars
getProvidedTypes()
public
static getProvidedTypes() : array<string, string>
Return values
array<string, string> —The PHP-types managed by getEnv(), keyed by prefixes