class Resolver

Services resolver

Traits

Strict class for better experience.

Methods

__construct(ContainerBuilder $builder)

No description

void
resolveDefinition(Definition $def)

No description

string|null
resolveReferenceType(Reference $ref)

No description

string|null
resolveEntityType(Statement $statement)

No description

void
completeDefinition(Definition $def)

No description

completeStatement(Statement $statement, bool $currentServiceAllowed = false)

No description

normalizeReference(Reference $ref)

Normalizes reference to 'self' or named reference (or leaves it typed if it is not possible during resolving) and checks existence of service.

resolveReference(Reference $ref)

No description

getByType(string $type)

Returns named reference to service resolved by type (or 'self' reference for local-autowiring).

addDependency(ReflectionClass|ReflectionFunctionAbstract|string $dep)

Adds item to the list of dependencies.

static array
autowireArguments(ReflectionFunctionAbstract $method, array $arguments, $resolver, Definition $current = null)

Add missing arguments using autowiring.

Details

at line 47
__construct(ContainerBuilder $builder)

Parameters

ContainerBuilder $builder

at line 54
ContainerBuilder getContainerBuilder()

Return Value

ContainerBuilder

at line 60
void resolveDefinition(Definition $def)

Parameters

Definition $def

Return Value

void

at line 84
string|null resolveReferenceType(Reference $ref)

Parameters

Reference $ref

Return Value

string|null

at line 99
string|null resolveEntityType(Statement $statement)

Parameters

Statement $statement

Return Value

string|null

at line 143
void completeDefinition(Definition $def)

Parameters

Definition $def

Return Value

void

at line 163
Statement completeStatement(Statement $statement, bool $currentServiceAllowed = false)

Parameters

Statement $statement
bool $currentServiceAllowed

Return Value

Statement

at line 317
Reference normalizeReference(Reference $ref)

Normalizes reference to 'self' or named reference (or leaves it typed if it is not possible during resolving) and checks existence of service.

Parameters

Reference $ref

Return Value

Reference

at line 343
Definition resolveReference(Reference $ref)

Parameters

Reference $ref

Return Value

Definition

at line 356
Reference getByType(string $type)

Returns named reference to service resolved by type (or 'self' reference for local-autowiring).

Parameters

string $type

Return Value

Reference

Exceptions

ServiceCreationException when multiple found
MissingServiceException when not found

at line 374
Resolver addDependency(ReflectionClass|ReflectionFunctionAbstract|string $dep)

Adds item to the list of dependencies.

Parameters

ReflectionClass|ReflectionFunctionAbstract|string $dep

Return Value

Resolver

at line 454
static array autowireArguments(ReflectionFunctionAbstract $method, array $arguments, $resolver, Definition $current = null)

Add missing arguments using autowiring.

Parameters

ReflectionFunctionAbstract $method
array $arguments
$resolver
Definition $current

Return Value

array

Exceptions

ServiceCreationException