DB_dsql::rewind PHP Méthode

rewind() public méthode

public rewind ( )
    public function rewind()
    {
        if ($this->_iterating) {
            $this->stmt = null;
            $this->_iterating = false;
        }
        $this->_iterating = true;
        return $this;
    }

Usage Example

Exemple #1
0
 public function next()
 {
     if ($this->_iterating === true) {
         $this->_iterating = $this->selectQuery();
         $this->_iterating->stmt = null;
         $this->_iterating->rewind();
         $this->hook('beforeLoad', array($this->_iterating));
     }
     $this->_iterating->next();
     $this->data = $this->_iterating->current();
     if ($this->data === false) {
         $this->unload();
         $this->_iterating = false;
         return;
     }
     $this->id = @$this->data[$this->id_field];
     $this->dirty = array();
     $this->hook('afterLoad');
 }
All Usage Examples Of DB_dsql::rewind