La classe CachingIterator

(PHP 5, PHP 7)

Introduction

Cet objet supporte les itérations en cache sur un autre itérateur.

Synopsis de la classe

CachingIterator extends IteratorIterator implements OuterIterator , ArrayAccess , Countable {
/* Constantes */
const integer CALL_TOSTRING = 1 ;
const integer CATCH_GET_CHILD = 16 ;
const integer TOSTRING_USE_KEY = 2 ;
const integer TOSTRING_USE_CURRENT = 4 ;
const integer TOSTRING_USE_INNER = 8 ;
const integer FULL_CACHE = 256 ;
/* Méthodes */
public __construct ( Iterator $iterator [, int $flags = self::CALL_TOSTRING ] )
public count ( void ) : int
public current ( void ) : mixed
public getCache ( void ) : array
public getFlags ( void ) : int
public getInnerIterator ( void ) : Iterator
public hasNext ( void ) : void
public key ( void ) : scalar
public next ( void ) : void
public offsetExists ( mixed $index ) : void
public offsetGet ( string $index ) : void
public offsetSet ( mixed $index , mixed $newval ) : void
public offsetUnset ( string $index ) : void
public rewind ( void ) : void
public setFlags ( int $flags ) : void
public __toString ( void ) : void
public valid ( void ) : void
}

Constantes pré-définies

CachingIterator::CALL_TOSTRING

Convertit tous les éléments en chaines.

CachingIterator::CATCH_GET_CHILD

N'envoie aucune exception lors de la tentative d'accéder à un enfant.

CachingIterator::TOSTRING_USE_KEY

Utilise key lors de la conversion en chaine.

CachingIterator::TOSTRING_USE_CURRENT

Utilise current lors de la conversion en chaine.

CachingIterator::TOSTRING_USE_INNER

Utilise inner lors de la conversion en chaine.

CachingIterator::FULL_CACHE

Met en cache toutes les données lues.

Sommaire