AbstractEnvironment
in package
implements
EnvironmentInterface
AbstractYes
This is a simple Environment implementation that other Environment can inherit from.
Table of Contents
Interfaces
- EnvironmentInterface
- Describes Environment interface.
Properties
- $virtualEnvironment : VirtualEnvironment
Methods
- __construct() : mixed
- env() : string
- Retrieve string value of environment variables.
- envBool() : bool
- Retrieve boolean value of environment variables.
- envFloat() : float
- Retrieve float value of environment variables.
- envInt() : int
- Retrieve integer value of environment variables.
- environments() : array<string, string>
- Retrieve all of environment variables.
Properties
$virtualEnvironment
private
VirtualEnvironment
$virtualEnvironment
= null
Methods
__construct()
public
__construct([array<string, mixed> $config = [] ]) : mixed
Parameters
- $config : array<string, mixed> = []
-
The configuration.
env()
Retrieve string value of environment variables.
public
env(string $name[, string $default = '' ]) : string
Parameters
- $name : string
-
Environment name
- $default : string = ''
-
Default value
Return values
stringenvBool()
Retrieve boolean value of environment variables.
public
envBool(string $name[, bool $default = false ]) : bool
Parameters
- $name : string
-
Environment name
- $default : bool = false
-
Default value
Return values
boolenvFloat()
Retrieve float value of environment variables.
public
envFloat(string $name[, float $default = 0 ]) : float
Parameters
- $name : string
-
Environment name
- $default : float = 0
-
Default value
Return values
floatenvInt()
Retrieve integer value of environment variables.
public
envInt(string $name[, int $default = 0 ]) : int
Parameters
- $name : string
-
Environment name
- $default : int = 0
-
Default value
Return values
intenvironments()
Retrieve all of environment variables.
public
environments() : array<string, string>