1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
<?php
namespace Transactd;
use \Transactd\TableIterator;
/**
* Implement the reverse server cursor.
*/
class TableReverseIterator extends TableIterator
{
/**
* Move to next record. (Previous of reverse direction)
*/
public function prev()
{
//$this->table->seekNext($this->lockBias);
nstable_seekNext($this->cPtr, $this->lockBias);
++$this->pos;
}
/**
* Move to previous record. (Next of reverse direction)
*/
public function next()
{
//$this->table->seekPrev($this->lockBias);
nstable_seekPrev($this->cPtr, $this->lockBias);
++$this->pos;
}
}