Menu

## DecoratorResolver
in package
implements DefinitionResolver

DecoratorResolver.php : 20

Resolves a decorator definition to a value.

##### Tags

template-implements

  DefinitionResolver<DecoratorDefinition>

since
  5.0
author

  Matthieu Napoli matthieu@mnapoli.fr

### Table of Contents

#### Interfaces

DefinitionResolver
  Resolves a definition to a value.

#### Properties

$container : ContainerInterface
$definitionResolver : DefinitionResolver

#### Methods

__construct() : mixed
  The resolver needs a container. This container will be passed to the factory as a parameter so that the factory can access other entries of the container.
isResolvable() : bool
  Check if a definition can be resolved.
resolve() : mixed
  Resolve a decorator definition to a value.

### Properties

#### $container

DecoratorResolver.php : 29
`private ContainerInterface $container`

#### $definitionResolver

DecoratorResolver.php : 30
`private DefinitionResolver $definitionResolver`

### Methods

#### __construct()

DecoratorResolver.php : 28

The resolver needs a container. This container will be passed to the factory as a parameter so that the factory can access other entries of the container.

`public __construct(ContainerInterface $container, DefinitionResolver $definitionResolver) : mixed`

##### Parameters

$container : ContainerInterface
$definitionResolver : DefinitionResolver

  Used to resolve nested definitions.

#### isResolvable()

DecoratorResolver.php : 70

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

DecoratorResolver.php : 41

Resolve a decorator definition to a value.

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

This will call the callable of the definition and pass it the decorated entry.

##### Parameters

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

  Optional parameters to use to build the entry.

##### Return values

mixed —

Value obtained from the definition.

## Search results