Menu

## ArrayResolver
in package
implements DefinitionResolver

ArrayResolver.php : 20

Resolves an array definition to a value.

##### Tags

template-implements

  DefinitionResolver<ArrayDefinition>

since
  5.0
author

  Matthieu Napoli matthieu@mnapoli.fr

### Table of Contents

#### Interfaces

DefinitionResolver
  Resolves a definition to a value.

#### Properties

$definitionResolver : DefinitionResolver

#### Methods

__construct() : mixed
isResolvable() : bool
  Check if a definition can be resolved.
resolve() : mixed
  Resolve a definition to a value.
resolveDefinition() : mixed

### Properties

#### $definitionResolver

ArrayResolver.php : 26
`private DefinitionResolver $definitionResolver`

### Methods

#### __construct()

ArrayResolver.php : 25
`public __construct(DefinitionResolver $definitionResolver) : mixed`

##### Parameters

$definitionResolver : DefinitionResolver

  Used to resolve nested definitions.

#### isResolvable()

ArrayResolver.php : 53

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()

ArrayResolver.php : 39

Resolve a definition to a value.

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

Resolve an array definition to a value.

An array definition can contain simple values or references to other entries.

##### Parameters

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

  Optional parameters to use to build the entry.

##### Return values

mixed —

Value obtained from the definition.

#### resolveDefinition()

ArrayResolver.php : 61
`private resolveDefinition(Definition $value, ArrayDefinition $definition, int|string $key) : mixed`

##### Parameters

$value : Definition
$definition : ArrayDefinition
$key : int|string

##### Tags

throws
  DependencyException

## Search results