LimitIterator::valid
MultipleIterator::attachIterator
Iterators
PHP Manual

# The MultipleIterator class

## Introduction

An Iterator that iterates over several iterators one after the other.

## Class synopsis

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

## Predefined Constants

## MultipleIterator Node Types

`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

- MultipleIterator::attachIterator — Attaches iterator information
- MultipleIterator::__construct — Constructs a new MultipleIterator
- MultipleIterator::containsIterator — Checks if an iterator is attached
- MultipleIterator::countIterators — Gets the number of attached iterator instances
- MultipleIterator::current — Gets the registered iterator instances
- MultipleIterator::detachIterator — Detaches an iterator
- MultipleIterator::getFlags — Gets the flag information
- MultipleIterator::key — Gets the registered iterator instances
- MultipleIterator::next — Moves all attached iterator instances forward
- MultipleIterator::rewind — Rewinds all attached iterator instances
- MultipleIterator::setFlags — Sets flags
- MultipleIterator::valid — Checks the validity of sub iterators

LimitIterator::valid
MultipleIterator::attachIterator
Iterators
PHP Manual