◆ __construct()
DI\Definition\EnvironmentVariableDefinition::__construct |
( |
private string | $variableName, |
|
|
private bool | $isOptional = false, |
|
|
private mixed | $defaultValue = null ) |
- Parameters
-
string | $variableName | The name of the environment variable |
bool | $isOptional | Whether or not the environment variable definition is optional. If true and the environment variable given by $variableName has not been defined, $defaultValue is used. |
mixed | $defaultValue | The default value to use if the environment variable is optional and not provided |
◆ __toString()
DI\Definition\EnvironmentVariableDefinition::__toString |
( |
| ) |
|
◆ getDefaultValue()
DI\Definition\EnvironmentVariableDefinition::getDefaultValue |
( |
| ) |
|
- Return values
-
mixed | The default value to use if the environment variable is optional and not provided |
◆ getName()
DI\Definition\EnvironmentVariableDefinition::getName |
( |
| ) |
|
◆ getVariableName()
DI\Definition\EnvironmentVariableDefinition::getVariableName |
( |
| ) |
|
- Return values
-
string | The name of the environment variable |
◆ isOptional()
DI\Definition\EnvironmentVariableDefinition::isOptional |
( |
| ) |
|
- Return values
-
bool | Whether or not the environment variable definition is optional |
◆ replaceNestedDefinitions()
DI\Definition\EnvironmentVariableDefinition::replaceNestedDefinitions |
( |
callable | $replacer | ) |
|
◆ setName()
DI\Definition\EnvironmentVariableDefinition::setName |
( |
string | $name | ) |
|
The documentation for this class was generated from the following file:
- lib/php-di/php-di/src/Definition/EnvironmentVariableDefinition.php