DAOResultFactory Class Reference
[Db]

Wrapper around ADORecordSet providing "factory" features for generating objects from DAOs. More...

Inheritance diagram for DAOResultFactory:

ItemIterator

List of all members.

Public Member Functions

 _cleanup ()
 DAOResultFactory (&$records, &$dao, $functionName)
 eof ()
next ()
nextWithKey ()
 wasEmpty ()

Public Attributes

 $dao
 $functionName
 $records
 $wasEmpty


Detailed Description

Wrapper around ADORecordSet providing "factory" features for generating objects from DAOs.

Definition at line 21 of file DAOResultFactory.inc.php.


Member Function Documentation

DAOResultFactory._cleanup (  ) 

PRIVATE function used internally to clean up the record set. This is called aggressively because it can free resources.

Definition at line 146 of file DAOResultFactory.inc.php.

Referenced by eof(), and next().

DAOResultFactory.DAOResultFactory ( &$  records,
&$  dao,
functionName 
)

Constructor. Initialize the DAOResultFactory

Parameters:
$records object ADO record set
$dao object DAO class for factory
$functionName The function to call on $dao to create an object

Definition at line 47 of file DAOResultFactory.inc.php.

References $dao, $functionName, $records, and wasEmpty().

DAOResultFactory.eof (  ) 

Return a boolean indicating whether or not we've reached the end of results

Returns:
boolean

Reimplemented from ItemIterator.

Definition at line 125 of file DAOResultFactory.inc.php.

References _cleanup().

& DAOResultFactory.next (  ) 

Return the object representing the next row.

Returns:
object

Reimplemented from ItemIterator.

Definition at line 76 of file DAOResultFactory.inc.php.

References $dao, $functionName, and _cleanup().

Referenced by nextWithKey().

& DAOResultFactory.nextWithKey (  ) 

Return the next row, with key.

Returns:
array ($key, $value)

Reimplemented from ItemIterator.

Definition at line 95 of file DAOResultFactory.inc.php.

References next().

DAOResultFactory.wasEmpty (  ) 

Return a boolean indicating whether or not this resultset was empty from the beginning

Returns:
boolean

Reimplemented from ItemIterator.

Definition at line 138 of file DAOResultFactory.inc.php.

Referenced by DAOResultFactory().


Member Data Documentation

DAOResultFactory.$dao

The DAO used to create objects

Definition at line 23 of file DAOResultFactory.inc.php.

Referenced by DAOResultFactory(), and next().

DAOResultFactory.$functionName

The name of the DAO's factory function (to be called with an associative array of values)

Definition at line 26 of file DAOResultFactory.inc.php.

Referenced by DAOResultFactory(), and next().

DAOResultFactory.$records

The ADORecordSet to be wrapped around

Definition at line 29 of file DAOResultFactory.inc.php.

Referenced by DAOResultFactory().

DAOResultFactory.$wasEmpty

True iff the resultset was always empty

Definition at line 32 of file DAOResultFactory.inc.php.


The documentation for this class was generated from the following file:

Generated on Mon Jul 14 10:55:41 2008 for Open Journal Systems by  doxygen 1.5.6