public function __construct(\recursiveIterator $iterator, $closure = null) { parent::__construct($iterator); if ($closure !== null) { foreach ((array) $closure as $c) { $this->addClosure($c); } } }