Documentation

ResolverDispatcher
in package
implements DefinitionResolver

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

Methods

isResolvable()

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

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

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

        
On this page

Search results