PHP Class DI\Definition\EnvironmentVariableDefinition

Author: James Harris ([email protected])
Inheritance: implements CacheableDefinition
Show file Open project: mnapoli/php-di

Public Methods

Method Description
__construct ( string $name, string $variableName, boolean $isOptional = false, mixed $defaultValue = null )
__toString ( )
getDefaultValue ( ) : mixed
getName ( ) : string
getScope ( )
getVariableName ( ) : string
isOptional ( ) : boolean
setScope ( string $scope )

Method Details

__construct() public method

public __construct ( string $name, string $variableName, boolean $isOptional = false, mixed $defaultValue = null )
$name string Entry name
$variableName string The name of the environment variable
$isOptional boolean Whether or not the environment variable definition is optional
$defaultValue mixed The default value to use if the environment variable is optional and not provided

__toString() public method

public __toString ( )

getDefaultValue() public method

public getDefaultValue ( ) : mixed
return mixed The default value to use if the environment variable is optional and not provided

getName() public method

public getName ( ) : string
return string Entry name

getScope() public method

public getScope ( )

getVariableName() public method

public getVariableName ( ) : string
return string The name of the environment variable

isOptional() public method

public isOptional ( ) : boolean
return boolean Whether or not the environment variable definition is optional

setScope() public method

public setScope ( string $scope )
$scope string