public function __construct(IGenerator $generator) { parent::__construct($generator->getIterator()); $this->generator = $generator; }