ResultSetIterator Class Reference

List of all members.

Public Member Functions

 __construct (ResultSet $rs)
 Construct the iterator.
 rewind ()
 If not at start of resultset, this method will call seek(0).
 valid ()
 This method checks to see whether there are more results by advancing the cursor position.
 key ()
 Returns the cursor position.
 current ()
 Returns the row (assoc array) at current cursor pos.
 next ()
 This method does not actually do anything since we have already advanced the cursor pos in valid().

Private Attributes

 $rs


Detailed Description

Definition at line 52 of file ResultSetIterator.php.


Constructor & Destructor Documentation

ResultSetIterator::__construct ( ResultSet rs  ) 

Construct the iterator.

Parameters:
ResultSet $rs

Definition at line 60 of file ResultSetIterator.php.

00061     {
00062         $this->rs = $rs;
00063     }


Member Function Documentation

ResultSetIterator::current (  ) 

Returns the row (assoc array) at current cursor pos.

Returns:
array

Definition at line 99 of file ResultSetIterator.php.

00100     {
00101        return $this->rs->getRow();
00102     }

ResultSetIterator::key (  ) 

Returns the cursor position.

Returns:
int

Definition at line 90 of file ResultSetIterator.php.

00091     {
00092         return $this->rs->getCursorPos();
00093     }

ResultSetIterator::next (  ) 

This method does not actually do anything since we have already advanced the cursor pos in valid().

See also:
valid()

Definition at line 109 of file ResultSetIterator.php.

00110     {
00111     }

ResultSetIterator::rewind (  ) 

If not at start of resultset, this method will call seek(0).

See also:
ResultSet::seek()

Definition at line 69 of file ResultSetIterator.php.

00070     {
00071         if (!$this->rs->isBeforeFirst()) {
00072             $this->rs->seek(0);
00073         }
00074     }

ResultSetIterator::valid (  ) 

This method checks to see whether there are more results by advancing the cursor position.

See also:
ResultSet::next()

Definition at line 81 of file ResultSetIterator.php.

00082     {
00083         return $this->rs->next();
00084     }


Member Data Documentation

ResultSetIterator::$rs [private]

Definition at line 54 of file ResultSetIterator.php.


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

Generated on Wed May 6 23:10:50 2009 for fareofficelib by  doxygen 1.5.8