'MySQLMasterPos' => 'includes/db/DatabaseMysql.php',
'ORAField' => 'includes/db/DatabaseOracle.php',
'ORAResult' => 'includes/db/DatabaseOracle.php',
+ 'ORMIterator' => 'includes/db/ORMIterator',
'ORMResult' => 'includes/db/ORMResult.php',
'ORMRow' => 'includes/db/ORMRow.php',
'ORMTable' => 'includes/db/ORMTable.php',
* @return ORMResult
*/
public function select( $fields = null, array $conditions = array(),
- array $options = array(), $functionName = null );
+ array $options = array(), $functionName = null );
/**
* Selects the the specified fields of the records matching the provided
* @return array of self
*/
public function selectObjects( $fields = null, array $conditions = array(),
- array $options = array(), $functionName = null );
+ array $options = array(), $functionName = null );
/**
* Do the actual select.
* @return ResultWrapper
*/
public function rawSelect( $fields = null, array $conditions = array(),
- array $options = array(), $functionName = null );
+ array $options = array(), $functionName = null );
/**
* Selects the the specified fields of the records matching the provided
* @return array of array
*/
public function selectFields( $fields = null, array $conditions = array(),
- array $options = array(), $collapse = true, $functionName = null );
+ array $options = array(), $collapse = true, $functionName = null );
/**
* Selects the the specified fields of the first matching record.
--- /dev/null
+<?php
+
+/**
+ * Interface for Iterators containing IORMRows.
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 1.20
+ *
+ * @file
+ * @ingroup ORM
+ *
+ * @licence GNU GPL v2 or later
+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
+ */
+interface ORMIterator extends Iterator {
+
+ /**
+ * @see Iterator::current()
+ * @return IORMRow
+ */
+ public function current();
+
+}
\ No newline at end of file
<?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).
*
* 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
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
-class ORMResult implements Iterator {
+class ORMResult implements ORMIterator {
/**
* @var ResultWrapper
/**
* @var integer
*/
- protected $key;
+ protected $key;
/**
* @var IORMRow