MultipleIterator
class MultipleIterator implements Iterator (View source)
An Iterator that sequentially iterates over all attached iterators
Constants
MIT_NEED_ANY |
|
MIT_NEED_ALL |
|
MIT_KEYS_NUMERIC |
|
MIT_KEYS_ASSOC |
|
Methods
Constructs a new MultipleIterator
Gets the flag information
Sets flags
Gets the number of attached iterator instances
Rewinds all attached iterator instances
Checks the validity of sub iterators
Gets the registered iterator instances
Gets the registered iterator instances
Moves all attached iterator instances forward
No description
Details
__construct(int $flags = MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_NUMERIC)
Constructs a new MultipleIterator
int
getFlags()
Gets the flag information
void
setFlags(int $flags)
Sets flags
void
attachIterator(Iterator $iterator, int|string|null $info = null)
Attaches iterator information
void
detachIterator(Iterator $iterator)
Detaches an iterator
bool
containsIterator(Iterator $iterator)
Checks if an iterator is attached
int
countIterators()
Gets the number of attached iterator instances
void
rewind()
Rewinds all attached iterator instances
bool
valid()
Checks the validity of sub iterators
mixed
key()
Gets the registered iterator instances
mixed
current()
Gets the registered iterator instances
void
next()
Moves all attached iterator instances forward
array
__debugInfo()
No description