W3cubDocs

/Symfony 4.1

AutowirePass

class AutowirePass extends AbstractRecursivePass

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

Properties

protected ContainerBuilder $container from AbstractRecursivePass
protected $currentId from AbstractRecursivePass

Methods

process(ContainerBuilder $container)

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

mixed processValue(mixed $value, bool $isRoot = false)

Processes a value found in a definition tree.

ReflectionFunctionAbstract|null getConstructor(Definition $definition, bool $required) from AbstractRecursivePass
ReflectionFunctionAbstract getReflectionMethod(Definition $definition, string $method) from AbstractRecursivePass
__construct(bool $throwOnAutowireException = true)

Details

process(ContainerBuilder $container)

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

Parameters

ContainerBuilder $container

protected mixed processValue(mixed $value, bool $isRoot = false)

Processes a value found in a definition tree.

Parameters

mixed $value
bool $isRoot

Return Value

mixed The processed value

protected ReflectionFunctionAbstract|null getConstructor(Definition $definition, bool $required)

Parameters

Definition $definition
bool $required

Return Value

ReflectionFunctionAbstract|null

Exceptions

RuntimeException

protected ReflectionFunctionAbstract getReflectionMethod(Definition $definition, string $method)

Parameters

Definition $definition
string $method

Return Value

ReflectionFunctionAbstract

Exceptions

RuntimeException

__construct(bool $throwOnAutowireException = true)

Parameters

bool $throwOnAutowireException

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