Menu

## ResolverDispatcher
in package
implements DefinitionResolver

ResolverDispatcher.php : 27

Dispatches to more specific resolvers.

Dynamic dispatch pattern.

##### Tags

since
  5.0
author

  Matthieu Napoli matthieu@mnapoli.fr

### Table of Contents

#### Interfaces

DefinitionResolver
  Resolves a definition to a value.

#### Properties

$arrayResolver : ArrayResolver|null
$container : ContainerInterface
$decoratorResolver : DecoratorResolver|null
$envVariableResolver : EnvironmentVariableResolver|null
$factoryResolver : FactoryResolver|null
$instanceResolver : InstanceInjector|null
$objectResolver : ObjectCreator|null
$proxyFactory : ProxyFactory

#### Methods

__construct() : mixed
isResolvable() : bool
  Check if a definition can be resolved.
resolve() : mixed
  Resolve a definition to a value.
getDefinitionResolver() : DefinitionResolver
  Returns a resolver capable of handling the given definition.

### Properties

#### $arrayResolver

ResolverDispatcher.php : 29
`private ArrayResolver|null $arrayResolver = null`

#### $container

ResolverDispatcher.php : 37
`private ContainerInterface $container`

#### $decoratorResolver

ResolverDispatcher.php : 31
`private DecoratorResolver|null $decoratorResolver = null`

#### $envVariableResolver

ResolverDispatcher.php : 34
`private EnvironmentVariableResolver|null $envVariableResolver = null`

#### $factoryResolver

ResolverDispatcher.php : 30
`private FactoryResolver|null $factoryResolver = null`

#### $instanceResolver

ResolverDispatcher.php : 33
`private InstanceInjector|null $instanceResolver = null`

#### $objectResolver

ResolverDispatcher.php : 32
`private ObjectCreator|null $objectResolver = null`

#### $proxyFactory

ResolverDispatcher.php : 38
`private ProxyFactory $proxyFactory`

### Methods

#### __construct()

ResolverDispatcher.php : 36
`public __construct(ContainerInterface $container, ProxyFactory $proxyFactory) : mixed`

##### Parameters

$container : ContainerInterface
$proxyFactory : ProxyFactory

#### isResolvable()

ResolverDispatcher.php : 63

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

ResolverDispatcher.php : 51

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

throws
  InvalidDefinition

  If the definition cannot be resolved.

##### Return values

mixed —

Value obtained from the definition.

#### getDefinitionResolver()

ResolverDispatcher.php : 80

Returns a resolver capable of handling the given definition.

`private getDefinitionResolver(Definition $definition) : DefinitionResolver`

##### Parameters

$definition : Definition

##### Tags

throws
  RuntimeException

  No definition resolver was found for this type of definition.

##### Return values

DefinitionResolver

## Search results