Copied!

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

CloneableInstantiable
Methods
public __construct(bool $throwOnAutowireException = true)
public process(Symfony\Component\DependencyInjection\ContainerBuilder $container)
 
  • return void
Properties
protected Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass::$container = NULL
 
  • var \ContainerBuilder
protected Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass::$currentId = NULL
Methods
protected Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass::enableExpressionProcessing()
 
  • return void
protected Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass::getConstructor(Symfony\Component\DependencyInjection\Definition $definition, bool $required) : ?ReflectionFunctionAbstract
 
  • throws \RuntimeException
protected Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass::getReflectionMethod(Symfony\Component\DependencyInjection\Definition $definition, string $method) : ReflectionFunctionAbstract
 
  • throws \RuntimeException
protected Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass::inExpression(bool $reset = true) : bool
protected processValue(?mixed $value, bool $isRoot = false) : ?mixed
Properties
private array $ambiguousServiceTypes
private array $autowiringAliases
private ?string $decoratedClass = NULL
private ?string $decoratedId = NULL
private ?int $decoratedMethodArgumentIndex = NULL
private ?int $decoratedMethodIndex = NULL
private object $defaultArgument
private ?Closure $getPreviousValue = NULL
private ?string $lastFailure = NULL
private ?array $methodCalls = NULL
private bool $throwOnAutowiringException
private array $types
private ?self $typesClone = NULL
Methods
private autowireCalls(ReflectionClass $reflectionClass, bool $isRoot, bool $checkAttributes) : array
private autowireMethod(ReflectionFunctionAbstract $reflectionMethod, array $arguments, bool $checkAttributes, int $methodIndex) : array
 

Autowires the constructor or a method.

  • throws \AutowiringFailedException
private createTypeAlternatives(Symfony\Component\DependencyInjection\ContainerBuilder $container, Symfony\Component\DependencyInjection\TypedReference $reference) : string
private createTypeNotFoundMessage(Symfony\Component\DependencyInjection\TypedReference $reference, string $label, string $currentId) : string
private createTypeNotFoundMessageCallback(Symfony\Component\DependencyInjection\TypedReference $reference, string $label) : Closure
private doProcessValue(?mixed $value, bool $isRoot = false) : ?mixed
private getAliasesSuggestionForType(Symfony\Component\DependencyInjection\ContainerBuilder $container, string $type) : ?string
private getAutowiredReference(Symfony\Component\DependencyInjection\TypedReference $reference, bool $filterType) : ?Symfony\Component\DependencyInjection\TypedReference
 

Returns a reference to the service matching the given type, if any.

private getCombinedAlias(string $type, ?string $name = NULL) : ?string
private populateAutowiringAlias(string $id) : void
private populateAvailableType(Symfony\Component\DependencyInjection\ContainerBuilder $container, string $id, Symfony\Component\DependencyInjection\Definition $definition) : void
 

Populates the list of available types for a given definition.

private populateAvailableTypes(Symfony\Component\DependencyInjection\ContainerBuilder $container) : void
 

Populates the list of available types.

private set(string $type, string $id) : void
 

Associates a type and a service id if applicable.

© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration