AutowirePass

class AutowirePass extends AbstractRecursivePass

Inspects existing service definitions and wires the autowired ones using the type hints of their classes.

Methods

process(ContainerBuilder $container)

You can modify the container here before it is dumped to PHP code.

__construct(bool $throwOnAutowireException = true)
AutowiringFailedException[] getAutowiringExceptions() deprecated
static AutowireServiceResource createResourceForClass(ReflectionClass $reflectionClass) deprecated

Creates a resource to help know if this service has changed.

Details

process(ContainerBuilder $container)

You can modify the container here before it is dumped to PHP code.

Parameters

ContainerBuilder $container

__construct(bool $throwOnAutowireException = true)

Parameters

bool $throwOnAutowireException Errors can be retrieved via Definition::getErrors()

AutowiringFailedException[] getAutowiringExceptions() deprecated

deprecated

since version 3.4, to be removed in 4.0.

Return Value

AutowiringFailedException[]

static AutowireServiceResource createResourceForClass(ReflectionClass $reflectionClass) deprecated

deprecated

since version 3.3, to be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.

Creates a resource to help know if this service has changed.

Parameters

ReflectionClass $reflectionClass

Return Value

AutowireServiceResource

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.4/Symfony/Component/DependencyInjection/Compiler/AutowirePass.html