Page MenuHomePhabricator
Diviner Phabricator Tech Docs PhabricatorFactUpdateIterator

final class PhabricatorFactUpdateIterator
Phabricator Technical Documentation (Fact)

Iterate over objects by update time in a stable way. This iterator only works for "normal" Lisk objects: objects with an auto-increment ID and a dateModified column.

Tasks

Methods to Implement

Configuration

  • final public function getPageSize() โ€” Get the configured page size.
  • final public function setPageSize($size) โ€” Configure the page size. Note that implementations may ignore this.

Iterator Implementation

  • final public function rewind()
  • final public function valid()
  • final public function current()
  • public function key()
  • final public function next()

Other Methods

Methods

protected function didRewind()

PhutilBufferedIterator

Called when rewind() is invoked. You should reset any internal cursor your implementation holds.

PhabricatorFactUpdateIterator
This method is not documented.
Return
void

protected function loadPage()

PhutilBufferedIterator

Called when the iterator needs a page of results. You should load the next result page and update your internal cursor to point past it.

If possible, you should use getPageSize() to choose a page size.

PhabricatorFactUpdateIterator
This method is not documented.
Return
list<wild>List of results.

final public function getPageSize()
Inherited

PhutilBufferedIterator

Get the configured page size.

Return
intPage size.

final public function setPageSize($size)
Inherited

PhutilBufferedIterator

Configure the page size. Note that implementations may ignore this.

Parameters
int$sizePage size.
Return
this

final public function rewind()
Inherited

This method is not documented.
Return
wild

final public function valid()
Inherited

This method is not documented.
Return
wild

final public function current()
Inherited

This method is not documented.
Return
wild

public function key()

PhutilBufferedIterator

By default, the iterator assigns a "natural" key (0, 1, 2, ...) to each result. This method is intentionally nonfinal so you can substitute a different behavior by overriding it if you prefer.

PhabricatorFactUpdateIterator
This method is not documented.
Return
scalarKey for the current result (as per @{method:current}).

final public function next()
Inherited

This method is not documented.
Return
wild

public function __construct($object)

This method is not documented.
Parameters
LiskDAO$object
Return
this//Implicit.//

public function setPosition($position)

This method is not documented.
Parameters
$position
Return
wild

protected function getCursorFromObject($object)

This method is not documented.
Parameters
$object
Return
wild