Menu

## DefinitionResolver
in

DefinitionResolver.php : 19

Resolves a definition to a value.

##### Tags

since
  4.0
author

  Matthieu Napoli matthieu@mnapoli.fr

template

  T of Definition

### Table of Contents

#### Methods

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

### Methods

#### isResolvable()

DefinitionResolver.php : 41

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.

##### Tags

psalm-param

  T $definition

##### Return values

bool

#### resolve()

DefinitionResolver.php : 32

Resolve a definition to a value.

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

##### 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.

##### Tags

psalm-param

  T $definition

throws
  InvalidDefinition

  If the definition cannot be resolved.

throws
  DependencyException

##### Return values

mixed —

Value obtained from the definition.

## Search results