phpday 2027 - Call for Papers

IteratorIterator::__construct

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

IteratorIterator::__construct — traversable な何かからイテレータを作成する

説明

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

traversable な何かからイテレータを作成します。

パラメータ

iterator

traversable なイテレータ。

class

内側のイテレータのために使うクラス名。 これを使うと、与えられたイテレータをラップするために異なるイテレータクラスを指定できます。 デフォルトでは、IteratorIterator を使います。

参考

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