* Fields can be retrieved with $row->fieldname, with fields acting like
* member variables.
*
- * @return object
+ * @return stdClass
* @throws DBUnexpectedError Thrown if the database returns an error
*/
function fetchObject() {
$this->db->dataSeek( $this, $row );
}
- /*********************
- * Iterator functions
+ /*
+ * ======= Iterator functions =======
* Note that using these in combination with the non-iterator functions
* above may cause rows to be skipped or repeated.
*/
}
/**
- * @return int
+ * @return stdClass|array|bool
*/
function current() {
if ( is_null( $this->currentRow ) ) {
}
/**
- * @return int
+ * @return stdClass
*/
function next() {
$this->pos++;
return count( $this->result );
}
+ /**
+ * @return array|bool
+ */
function fetchRow() {
if ( $this->pos < count( $this->result ) ) {
$this->currentRow = $this->result[$this->pos];
function free() {
}
- // Callers want to be able to access fields with $this->fieldName
+ /**
+ * Callers want to be able to access fields with $this->fieldName
+ * @return bool|stdClass
+ */
function fetchObject() {
$this->fetchRow();
if ( $this->currentRow ) {
$this->currentRow = null;
}
+ /**
+ * @return bool|stdClass
+ */
function next() {
return $this->fetchObject();
}
* The implementation details of this opaque type are up to the database subclass.
*/
interface DBMasterPos {
+ /**
+ * @return float UNIX timestamp
+ */
+ public function asOfTime();
}