class Resolver

internal  
 

Resolves and completes service definitions, including autowiring of arguments.

Methods

__construct(ContainerBuilder $builder)

No description

void
resolveDefinition(Definition $def)

Resolves the service type for the given definition.

string|null
resolveReferenceType(Reference $ref)

Returns the class name that the given reference points to, or null if not resolvable.

string|null
resolveEntityType(Statement $statement)

Returns the class name produced by the given statement's entity, or null if not resolvable.

void
completeDefinition(Definition $def)

Completes the service definition by resolving and autowiring all its arguments.

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

Resolves and autowires a statement's entity and arguments into a completed Statement.

array
completeArguments(array $arguments)

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)

Returns the definition that the reference points to.

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, callable $getter)

Add missing arguments using autowiring.

static array
getFirstClassCallable()

Returns the sentinel value used to mark first-class callable syntax (...).

Details

at line 36
__construct(ContainerBuilder $builder)

No description

Parameters

ContainerBuilder $builder

at line 43
ContainerBuilder getContainerBuilder()

No description

Return Value

ContainerBuilder

at line 52
void resolveDefinition(Definition $def)

Resolves the service type for the given definition.

Parameters

Definition $def

Return Value

void

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

Returns the class name that the given reference points to, or null if not resolvable.

Parameters

Reference $ref

Return Value

string|null

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

Returns the class name produced by the given statement's entity, or null if not resolvable.

Parameters

Statement $statement

Return Value

string|null

at line 164
void completeDefinition(Definition $def)

Completes the service definition by resolving and autowiring all its arguments.

Parameters

Definition $def

Return Value

void

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

Resolves and autowires a statement's entity and arguments into a completed Statement.

Parameters

Statement $statement
bool $currentServiceAllowed

Return Value

Statement

at line 326
array completeArguments(array $arguments)

No description

Parameters

array $arguments

Return Value

array

at line 386
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 412
Definition resolveReference(Reference $ref)

Returns the definition that the reference points to.

Parameters

Reference $ref

Return Value

Definition

at line 429
Reference getByType(string $type)

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

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

Adds item to the list of dependencies.

Parameters

ReflectionClass|ReflectionFunctionAbstract|string $dep

Return Value

Resolver

at line 556
static array autowireArguments(ReflectionFunctionAbstract $method, array $arguments, callable $getter)

Add missing arguments using autowiring.

Parameters

ReflectionFunctionAbstract $method
array $arguments
callable $getter

Return Value

array

Exceptions

ServiceCreationException

at line 699
static array getFirstClassCallable()

internal  
 

Returns the sentinel value used to mark first-class callable syntax (...).

Return Value

array