PHP Class DI\Definition\EnvironmentVariableDefinition

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

Méthodes publiques

Méthode 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 méthode

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 méthode

public __toString ( )

getDefaultValue() public méthode

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

getName() public méthode

public getName ( ) : string
Résultat string Entry name

getScope() public méthode

public getScope ( )

getVariableName() public méthode

public getVariableName ( ) : string
Résultat string The name of the environment variable

isOptional() public méthode

public isOptional ( ) : boolean
Résultat boolean Whether or not the environment variable definition is optional

setScope() public méthode

public setScope ( string $scope )
$scope string