/** * Implentation of the Iterator SPL class for Rewind(), * prepares the whole datasource for an entirely new iterator operation * * @access public */ public function rewind() { $this->datasource->rewind(); while ($this->valid() && $this->shouldKeep($this->current(), $this->key()) == false) { $this->next(); } }
/** * Implentation of the Iterator SPL class for Rewind(), * prepares the whole datasource for an entirely new iterator operation * * @access public */ public function rewind() { $this->datasource->rewind(); //Process the transformers if ($this->valid()) { $this->transformedData = $this->transform($this->datasource->current(), $this->datasource->key()); } }
/** * Restarts the iterator * * @return NULL */ public function rewind() { if (!isset($this->offset)) { return NULL; } $this->inner->rewind(); if ($this->offset == 0) { return NULL; } // If they gave us a seekable iterator, make use of it if ($this->inner instanceof \SeekableIterator) { try { $this->inner->seek($this->offset); } catch (\OutOfBoundsException $err) { } } else { for ($i = 0; $i < $this->offset && $this->valid(); $i++) { $this->next(); } } }
/** * Rewind the iterator to the first element. * * @return void */ public function rewind() { return $this->_iterator->rewind(); }
/** * Set the list iterator to that of the current container shard */ protected function setIteratorFromCurrentShard() { $this->iter = $this->listFromShard($this->container . $this->shardSuffixes[$this->curShard], $this->directory, $this->params); // Start loading results so that current() works if ($this->iter) { $this->iter instanceof Iterator ? $this->iter->rewind() : reset($this->iter); } }
/** * {@inheritdoc} * * @return void */ public function rewind() { $this->iterator->rewind(); }
public function rewind() { $this->input->rewind(); }