public function __construct(\Iterator $iterator, int $offset = 0, int $count = -1, int $mode = self::MODE_PASS)
{
if (!$iterator instanceof \Countable) {
throw new \InvalidArgumentException('Supplied iterator must be countable');
}
parent::__construct($iterator, $offset, $count);
$this->offset = $offset;
$this->count = $count;
$this->mode = $mode;
}