class Autowiring

Resolves service names by type for autowiring.

Methods

__construct(ContainerBuilder $builder)

No description

string|null
getByType(string $type, bool $throw = false)

Resolves service name by type.

array
findByType(string $type)

Gets the service names and definitions of the specified type.

void
addExcludedClasses(array $types)

Excludes classes and their ancestors from autowiring lookup.

array
getClassList()

Returns low-priority and high-priority type-to-service-names maps.

void
rebuild()

Rebuilds the type-to-service-names index from current definitions.

Details

at line 28
__construct(ContainerBuilder $builder)

No description

Parameters

ContainerBuilder $builder

at line 41
string|null getByType(string $type, bool $throw = false)

Resolves service name by type.

Parameters

string $type
bool $throw

Return Value

string|null

Exceptions

MissingServiceException
ServiceCreationException

at line 79
array findByType(string $type)

Gets the service names and definitions of the specified type.

Parameters

string $type

Return Value

array

service name => definition

at line 97
void addExcludedClasses(array $types)

Excludes classes and their ancestors from autowiring lookup.

Parameters

array $types

Return Value

void

at line 112
array getClassList()

Returns low-priority and high-priority type-to-service-names maps.

Return Value

array

at line 121
void rebuild()

Rebuilds the type-to-service-names index from current definitions.

Return Value

void