TaggedIteratorArgument
extends IteratorArgument
in package
Represents a collection of services found by tag name to lazily iterate over.
Tags
Table of Contents
Properties
- $defaultIndexMethod : string|null
- $defaultPriorityMethod : string|null
- $exclude : array<string|int, mixed>
- $excludeSelf : bool
- $indexAttribute : mixed
- $needsIndexes : bool
- $tag : string
Methods
- __construct() : mixed
- excludeSelf() : bool
- getDefaultIndexMethod() : string|null
- getDefaultPriorityMethod() : string|null
- getExclude() : array<string|int, mixed>
- getIndexAttribute() : string|null
- getTag() : string
- getValues() : array<string|int, mixed>
- needsIndexes() : bool
- setValues() : void
Properties
$defaultIndexMethod
private
string|null
$defaultIndexMethod
$defaultPriorityMethod
private
string|null
$defaultPriorityMethod
$exclude
private
array<string|int, mixed>
$exclude
$excludeSelf
private
bool
$excludeSelf
= true
$indexAttribute
private
mixed
$indexAttribute
$needsIndexes
private
bool
$needsIndexes
$tag
private
string
$tag
Methods
__construct()
public
__construct(string $tag[, string|null $indexAttribute = null ][, string|null $defaultIndexMethod = null ][, bool $needsIndexes = false ][, string|null $defaultPriorityMethod = null ][, array<string|int, mixed> $exclude = [] ][, bool $excludeSelf = true ]) : mixed
Parameters
- $tag : string
-
The name of the tag identifying the target services
- $indexAttribute : string|null = null
-
The name of the attribute that defines the key referencing each service in the tagged collection
- $defaultIndexMethod : string|null = null
-
The static method that should be called to get each service's key when their tag doesn't define the previous attribute
- $needsIndexes : bool = false
-
Whether indexes are required and should be generated when computing the map
- $defaultPriorityMethod : string|null = null
-
The static method that should be called to get each service's priority when their tag doesn't define the "priority" attribute
- $exclude : array<string|int, mixed> = []
-
Services to exclude from the iterator
- $excludeSelf : bool = true
-
Whether to automatically exclude the referencing service from the iterator
excludeSelf()
public
excludeSelf() : bool
Return values
boolgetDefaultIndexMethod()
public
getDefaultIndexMethod() : string|null
Return values
string|nullgetDefaultPriorityMethod()
public
getDefaultPriorityMethod() : string|null
Return values
string|nullgetExclude()
public
getExclude() : array<string|int, mixed>
Return values
array<string|int, mixed>getIndexAttribute()
public
getIndexAttribute() : string|null
Return values
string|nullgetTag()
public
getTag() : string
Return values
stringgetValues()
public
getValues() : array<string|int, mixed>
Return values
array<string|int, mixed>needsIndexes()
public
needsIndexes() : bool
Return values
boolsetValues()
public
setValues(array<string|int, mixed> $values) : void
Parameters
- $values : array<string|int, mixed>