Controller_Data::loadCurrent PHP Метод

loadCurrent() публичный Метод

Load next data row from cursor.
public loadCurrent ( $model, &$cursor )
    public function loadCurrent($model, &$cursor)
    {
        $model->data = array_shift($cursor);
        $model->id = $model->data[$model->id_field];
    }

Usage Example

Пример #1
0
 public function next()
 {
     $this->hook('beforeLoad', array('iterating'));
     $this->controller->loadCurrent($this, $this->_cursor);
     if ($this->loaded()) {
         $this->hook('afterLoad');
     }
     return $this;
 }