<?php
/**
- * Result of a ORMTable::select, which returns ORMRow objects.
+ * ORMIterator that takes a ResultWrapper object returned from
+ * a select operation returning IORMRow objects (ie IORMTable::select).
+ *
+ * Documentation inline and at https://www.mediawiki.org/wiki/Manual:ORMTable
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* @since 1.20
*
* @file ORMResult.php
+ * @ingroup ORM
*
* @licence GNU GPL v2 or later
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
-class ORMResult implements Iterator {
+class ORMResult implements ORMIterator {
/**
* @var ResultWrapper
/**
* @var integer
*/
- protected $key;
+ protected $key;
/**
- * @var ORMRow
+ * @var IORMRow
*/
protected $current;
/**
- * @var ORMTable
+ * @var IORMTable
*/
protected $table;
/**
- * @param ORMTable $table
+ * @param IORMTable $table
* @param ResultWrapper $res
*/
- public function __construct( ORMTable $table, ResultWrapper $res ) {
+ public function __construct( IORMTable $table, ResultWrapper $res ) {
$this->table = $table;
$this->res = $res;
$this->key = 0;
if ( $row === false ) {
$this->current = false;
} else {
- $this->current = $this->table->newFromDBResult( $row );
+ $this->current = $this->table->newRowFromDBResult( $row );
}
}
}
/**
- * @return ORMRow
+ * @return IORMRow
*/
public function current() {
return $this->current;