public function rewind() { $this->iterator->rewind(); if ($this->iterator->valid()) { $current = $this->iterator->current(); $this->currentIterator = Helper\LinqHelper::getIteratorOrThrow($current); if ($this->currentIterator != null) { $this->currentIterator->rewind(); } } else { $this->currentIterator = null; } $this->key = 0; }
/** * Returns all elements except the ones of the given sequence. * * @param array|\Iterator $second * @return Linq Returns all items of this not occuring in $second */ public function except($second) { LinqHelper::assertArgumentIsIterable($second, "second"); return new Linq(new ExceptIterator($this->iterator, LinqHelper::getIteratorOrThrow($second))); }