Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AutowireIterator.php

function AutowireIterator::__construct

Parameters

string $tag A tag name to search for to populate the iterator:

string|null $indexAttribute The name of the attribute that defines the key referencing each service in the tagged collection:

string|null $defaultIndexMethod The static method that should be called to get each service's key when their tag doesn't define the previous attribute:

string|null $defaultPriorityMethod The static method that should be called to get each service's priority when their tag doesn't define the "priority" attribute:

string|array<string> $exclude A service id or a list of service ids to exclude:

bool $excludeSelf Whether to automatically exclude the referencing service from the iterator:

Overrides Autowire::__construct

See also

ServiceSubscriberInterface::getSubscribedServices()

2 calls to AutowireIterator::__construct()
TaggedIterator::__construct in vendor/symfony/dependency-injection/Attribute/TaggedIterator.php
TaggedIterator::__construct in vendor/symfony/dependency-injection/Attribute/TaggedIterator.php
1 method overrides AutowireIterator::__construct()
TaggedIterator::__construct in vendor/symfony/dependency-injection/Attribute/TaggedIterator.php

File

vendor/symfony/dependency-injection/Attribute/AutowireIterator.php, line 32

Class

AutowireIterator
Autowires an iterator of services based on a tag name.

Namespace

Symfony\Component\DependencyInjection\Attribute

Code

public function __construct(string $tag, ?string $indexAttribute = null, ?string $defaultIndexMethod = null, ?string $defaultPriorityMethod = null, string|array $exclude = [], bool $excludeSelf = true) {
    parent::__construct(new TaggedIteratorArgument($tag, $indexAttribute, $defaultIndexMethod, false, $defaultPriorityMethod, (array) $exclude, $excludeSelf));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal