Search Results
The returned value from getInnerIterator() really is the inner iterator, not a clone. It should be used with respect: calling next() or rewind() on it, for example, will advance or reset the inner iterator - although the effect won't be noticed until you call next() on the IteratorIterator object - it seems as if it caches its current() and key ...
IteratorIterator::getInnerIterator 26 déc. 2018 20 fois (PHP 5 >= 5.1.0, PHP 7, PHP 8) IteratorIterator::getInnerIterator — Retourne l'itérateur interne
Sommaire IteratorIterator::__construct — Crée un itérateur à partir d'un objet traversable IteratorIterator::current — Lit la valeur courante IteratorIterator::getInnerIterator — Retourne l'itérateur interne IteratorIterator::key — Lit la clé de l'élément courant IteratorIterator::next — Avance au prochain élément
Table of Contents IteratorIterator::__construct — Create an iterator from anything that is traversable IteratorIterator::current — Get the current value IteratorIterator::getInnerIterator — Get the inner iterator IteratorIterator::key — Get the key of the current element IteratorIterator::next — Forward to the next element IteratorIterator::rewind — Rewind to the first element ...
Table of Contents ¶ IteratorIterator::__construct — Create an iterator from anything that is traversable IteratorIterator::current — Get the current value IteratorIterator::getInnerIterator — Get the inner iterator IteratorIterator::key — Get the key of the current element IteratorIterator::next — Forward to the next element IteratorIterator::rewind — Rewind to the first element ...
Table of Contents IteratorIterator::__construct — Create an iterator from anything that is traversable IteratorIterator::current — Get the current value IteratorIterator::getInnerIterator — Get the inner iterator IteratorIterator::key — Get the key of the current element IteratorIterator::next — Forward to the next element IteratorIterator::rewind — Rewind to the first element ...
People also ask
Is IteratorIterator a nested foreach?
Can a recursive iterator be used in a PHP script?
Do I need to implement IteratorAggregate in PHP?
What if a class does not implement an iterator?
Sep 2, 2009 · 5 Try as I might I cannot get my head around what the IteratorIterator class actually does. I understand that classes can implement Traversable so the engine knows it can loop using foreach and I realise that IteratorIterator is supposed to convert anything that is Traversable into an Iterator but I cannot for the life of me understand how.
