Merge "Fix for Ic74c7ba7 (c8c50eb): there's no reason to pass $this by reference."
[lhc/web/wiklou.git] / includes / db / ORMResult.php
index 1e6b83d..2a5837a 100644 (file)
@@ -1,6 +1,9 @@
 <?php
 /**
- * Result of a ORMTable::select, which returns IORMRow 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
@@ -26,7 +29,7 @@
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  */
 
-class ORMResult implements Iterator {
+class ORMResult implements ORMIterator {
 
        /**
         * @var ResultWrapper
@@ -36,7 +39,7 @@ class ORMResult implements Iterator {
        /**
         * @var integer
         */
-       protected  $key;
+       protected $key;
 
        /**
         * @var IORMRow
@@ -66,7 +69,7 @@ class ORMResult implements Iterator {
                if ( $row === false ) {
                        $this->current = false;
                } else {
-                       $this->current = $this->table->newFromDBResult( $row );
+                       $this->current = $this->table->newRowFromDBResult( $row );
                }
        }