next() public method

public next ( )
示例#1
0
文件: Model.php 项目: atk4/atk4
 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');
 }