public function __construct(lib_dbutils_ResultsetWrapper $ResultSet, $as_obj = false) { $this->ResultSetWrapper = $ResultSet; $this->asObj = $as_obj; if ($as_obj) { $this->resType = 'getObj'; } $this->currentRow = $this->ResultSetWrapper->{$this->resType}(); if ($this->currentRow) { $this->recordIndex = 1; } $this->allRowsCount = $this->ResultSetWrapper->getNumRows(); }
public function next() { $this->recordIndex++; if ($this->fromStack) { return; } $this->recordIndex++; $this->currentRow = $this->result->fetch_assoc(); if ($this->allowRewind && $this->fromStack === false) { $this->stack[] = $this->currentRow; if (false === $this->valid()) { $this->fromStack = true; } } }