Menu

## EnvironmentVariableResolver
in package
implements DefinitionResolver

EnvironmentVariableResolver.php : 18

Resolves a environment variable definition to a value.

##### Tags

template-implements

  DefinitionResolver<EnvironmentVariableDefinition>

author

  James Harris james.harris@icecave.com.au

### Table of Contents

#### Interfaces

DefinitionResolver
  Resolves a definition to a value.

#### Properties

$definitionResolver : DefinitionResolver
$variableReader : callable

#### Methods

__construct() : mixed
isResolvable() : bool
  Check if a definition can be resolved.
resolve() : mixed
  Resolve an environment variable definition to a value.
getEnvVariable() : mixed

### Properties

#### $definitionResolver

EnvironmentVariableResolver.php : 24
`private DefinitionResolver $definitionResolver`

#### $variableReader

EnvironmentVariableResolver.php : 21
`private callable $variableReader`

### Methods

#### __construct()

EnvironmentVariableResolver.php : 23
`public __construct(DefinitionResolver $definitionResolver[, mixed $variableReader = null ]) : mixed`

##### Parameters

$definitionResolver : DefinitionResolver
$variableReader : mixed = null

#### isResolvable()

EnvironmentVariableResolver.php : 60

Check if a definition can be resolved.

`public isResolvable(Definition $definition[, array<string|int, mixed> $parameters = [] ]) : bool`

##### Parameters

$definition : Definition

  Object that defines how the value should be obtained.

$parameters : array<string|int, mixed> = []

  Optional parameters to use to build the entry.

##### Return values

bool

#### resolve()

EnvironmentVariableResolver.php : 35

Resolve an environment variable definition to a value.

`public resolve(EnvironmentVariableDefinition $definition[, array<string|int, mixed> $parameters = [] ]) : mixed`

##### Parameters

$definition : EnvironmentVariableDefinition
$parameters : array<string|int, mixed> = []

  Optional parameters to use to build the entry.

##### Return values

mixed —

Value obtained from the definition.

#### getEnvVariable()

EnvironmentVariableResolver.php : 65
`protected getEnvVariable(string $variableName) : mixed`

##### Parameters

$variableName : string

## Search results