Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct ($records, $dao, $functionName, $idFields=array(), $functionParams=array()) | |
atFirstPage () | |
atLastPage () | |
close () | |
eof () | |
getCount () | |
getPage () | |
getPageCount () | |
move ($to) | |
next () | |
nextWithKey ($idField=null) | |
toArray () | |
toAssociativeArray ($idField='id') | |
toIterator () | |
wasEmpty () | |
Public Member Functions inherited from ItemIterator | |
__construct () | |
nextWithKey () | |
Data Fields | |
$count | |
$dao | |
$functionName | |
$functionParams | |
$idFields | |
$isFirst | |
$isLast | |
$page | |
$pageCount | |
$records | |
$wasEmpty | |
Wrapper around ADORecordSet providing "factory" features for generating objects from DAOs.
Definition at line 21 of file DAOResultFactory.inc.php.
DAOResultFactory::__construct | ( | $records, | |
$dao, | |||
$functionName, | |||
$idFields = array() , |
|||
$functionParams = array() |
|||
) |
Constructor. Initialize the DAOResultFactory
$records | object ADO record set |
$dao | object DAO class for factory |
$functionName | The function to call on $dao to create an object |
$idFields | array an array of primary key field names that uniquely identify a result row in the record set. Should be data object _data array key, not database column name |
Definition at line 73 of file DAOResultFactory.inc.php.
References $dao, $functionName, $functionParams, $idFields, $records, and wasEmpty().
DAOResultFactory::atFirstPage | ( | ) |
Determine whether this iterator represents the first page of a set.
Reimplemented from ItemIterator.
Definition at line 160 of file DAOResultFactory.inc.php.
References $isFirst.
DAOResultFactory::atLastPage | ( | ) |
Determine whether this iterator represents the last page of a set.
Reimplemented from ItemIterator.
Definition at line 168 of file DAOResultFactory.inc.php.
References $isLast.
DAOResultFactory::close | ( | ) |
Clean up the record set. This is called aggressively because it can free resources.
Definition at line 221 of file DAOResultFactory.inc.php.
DAOResultFactory::eof | ( | ) |
Return a boolean indicating whether or not we've reached the end of results
Reimplemented from ItemIterator.
Definition at line 200 of file DAOResultFactory.inc.php.
References close().
Referenced by toArray(), and toAssociativeArray().
DAOResultFactory::getCount | ( | ) |
Get the total number of items in the set.
Reimplemented from ItemIterator.
Definition at line 184 of file DAOResultFactory.inc.php.
References $count.
DAOResultFactory::getPage | ( | ) |
Get the page number of a set that this iterator represents.
Reimplemented from ItemIterator.
Definition at line 176 of file DAOResultFactory.inc.php.
References $page.
DAOResultFactory::getPageCount | ( | ) |
Get the total number of pages in the set.
Reimplemented from ItemIterator.
Definition at line 192 of file DAOResultFactory.inc.php.
References $pageCount.
DAOResultFactory::move | ( | $to | ) |
Advances the internal cursor to a specific row.
int | $to |
Definition at line 105 of file DAOResultFactory.inc.php.
DAOResultFactory::next | ( | ) |
Return the object representing the next row.
Reimplemented from ItemIterator.
Definition at line 117 of file DAOResultFactory.inc.php.
References $dao, $functionName, $records, and close().
Referenced by nextWithKey(), toArray(), and toAssociativeArray().
DAOResultFactory::nextWithKey | ( | $idField = null | ) |
Return the next row, with key.
Definition at line 137 of file DAOResultFactory.inc.php.
References next().
DAOResultFactory::toArray | ( | ) |
Convert this iterator to an array.
Reimplemented from ItemIterator.
Definition at line 233 of file DAOResultFactory.inc.php.
DAOResultFactory::toAssociativeArray | ( | $idField = 'id' | ) |
Convert this iterator to an associative array by database ID.
Definition at line 253 of file DAOResultFactory.inc.php.
DAOResultFactory::toIterator | ( | ) |
Return an Iterator for this DAOResultFactory.
Definition at line 245 of file DAOResultFactory.inc.php.
DAOResultFactory::wasEmpty | ( | ) |
Return a boolean indicating whether or not this resultset was empty from the beginning
Reimplemented from ItemIterator.
Definition at line 213 of file DAOResultFactory.inc.php.
References $wasEmpty.
Referenced by __construct().
DAOResultFactory::$count |
Definition at line 60 of file DAOResultFactory.inc.php.
Referenced by getCount().
DAO DAOResultFactory::$dao |
The DAO used to create objects
Definition at line 26 of file DAOResultFactory.inc.php.
Referenced by __construct(), and next().
string DAOResultFactory::$functionName |
The name of the DAO's factory function (to be called with an associative array of values)
Definition at line 32 of file DAOResultFactory.inc.php.
Referenced by __construct(), and next().
DAOResultFactory::$functionParams |
Definition at line 34 of file DAOResultFactory.inc.php.
Referenced by __construct().
array DAOResultFactory::$idFields |
an array of primary key field names that uniquely identify a result row in the record set.
Definition at line 43 of file DAOResultFactory.inc.php.
Referenced by __construct().
DAOResultFactory::$isFirst |
Definition at line 57 of file DAOResultFactory.inc.php.
Referenced by atFirstPage().
DAOResultFactory::$isLast |
Definition at line 58 of file DAOResultFactory.inc.php.
Referenced by atLastPage().
DAOResultFactory::$page |
Definition at line 59 of file DAOResultFactory.inc.php.
Referenced by getPage().
DAOResultFactory::$pageCount |
Definition at line 61 of file DAOResultFactory.inc.php.
Referenced by getPageCount().
ADORecordSet DAOResultFactory::$records |
The ADORecordSet to be wrapped around
Definition at line 49 of file DAOResultFactory.inc.php.
Referenced by __construct(), and next().
boolean DAOResultFactory::$wasEmpty |
True iff the resultset was always empty
Definition at line 55 of file DAOResultFactory.inc.php.
Referenced by wasEmpty().