phpday 2027 - Call for Papers

IteratorIterator::__construct

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

IteratorIterator::__construct — Crea un iterador a partir de un objeto traversable

Descripción

public function IteratorIterator::__construct(Traversable $iterator, ?string $class = null)

Crea un iterador a partir de un objeto traversable.

Parámetros

iterator

El iterador traversable.

class

El nombre de clase a utilizar para el iterador interno. Esto permite especificar una clase de iterador diferente para envolver el iterador proporcionado. Por omisión, la clase IteratorIterator misma será utilizada.

Véase también

User Contributed Notes

There are no user contributed notes for this page.
Adding new notes is disabled. Please see the links in the Found A Problem? section.
To Top