Copied!

Autowires an iterator of services based on a tag name.

CloneableInstantiable
Properties
public readonly array|bool Symfony\Component\DependencyInjection\Attribute\Autowire::$lazy
public readonly Symfony\Component\ExpressionLanguage\Expression|Symfony\Component\DependencyInjection\Reference|Symfony\Component\DependencyInjection\Argument\ArgumentInterface|array|string|?null Symfony\Component\DependencyInjection\Attribute\Autowire::$value
Methods
public __construct(string $tag, ?string $indexAttribute = NULL, array|string|?null $exclude = [], string|bool|?null $excludeSelf = true, $_)
 
  • see \ServiceSubscriberInterface::getSubscribedServices()
  • param string $tag A tag name to search for to populate the iterator
  • param string|null $indexAttribute The name of the attribute that defines the key referencing each service in the tagged collection
  • param string|string[] $exclude A service id or a list of service ids to exclude
  • param bool $excludeSelf Whether to automatically exclude the referencing service from the iterator
© 2026 Bruce Wells
Search Namespaces \ Classes
Configuration