Exemplo n.º 1
0
 /**
  * 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());
     }
 }
Exemplo n.º 3
0
 /**
  * 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();
         }
     }
 }
Exemplo n.º 4
0
 /**
  * Rewind the iterator to the first element.
  *
  * @return  void
  */
 public function rewind()
 {
     return $this->_iterator->rewind();
 }
Exemplo n.º 5
0
 /**
  * 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);
     }
 }
Exemplo n.º 6
0
 /**
  * {@inheritdoc}
  * 
  * @return void
  */
 public function rewind()
 {
     $this->iterator->rewind();
 }
Exemplo n.º 7
0
 public function rewind()
 {
     $this->input->rewind();
 }