public function __construct(Traversable $iterator)
{
/* FilterIterator requires an Iterator, so wrap all other Traversables
* with an IteratorIterator as a convenience.
*/
if (!$iterator instanceof Iterator) {
$iterator = new IteratorIterator($iterator);
}
parent::__construct($iterator);
}