The MultipleIterator class

(PHP 5 >= 5.3.0, PHP 7)

Introduction

An Iterator that sequentially iterates over all attached iterators

Class synopsis

MultipleIterator implements Iterator {
/* Constants */
const integer MIT_NEED_ANY = 0 ;
const integer MIT_NEED_ALL = 1 ;
const integer MIT_KEYS_NUMERIC = 0 ;
const integer MIT_KEYS_ASSOC = 2 ;
/* Methods */
public __construct ([ int $flags = MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC ] )
public attachIterator ( Iterator $iterator [, string $infos ] ) : void
public containsIterator ( Iterator $iterator ) : bool
public countIterators ( void ) : int
public current ( void ) : array
public detachIterator ( Iterator $iterator ) : void
public getFlags ( void ) : int
public key ( void ) : array
public next ( void ) : void
public rewind ( void ) : void
public setFlags ( int $flags ) : void
public valid ( void ) : bool
}

Predefined Constants

MultipleIterator::MIT_NEED_ANY

Do not require all sub iterators to be valid in iteration.

MultipleIterator::MIT_NEED_ALL

Require all sub iterators to be valid in iteration.

MultipleIterator::MIT_KEYS_NUMERIC

Keys are created from the sub iterators position.

MultipleIterator::MIT_KEYS_ASSOC

Keys are created from sub iterators associated information.

Table of Contents