Axiom (v1.2.0)

A lightweight PHP framework
axPDOStatementIterator Class Reference

PDO Statement Iterator Class. More...

Public Member Functions

 __construct (PDOStatement $statement)
 Constructor.
 seek ($position)
 SeekableIterator::seek() Implementation.
 count ()
 first ()
 Get the first item.
 last ()
 Get the last item.

Protected Attributes

 $_statement
 Internal statement reference.
 $_count
 Internal counter.

Detailed Description

PDO Statement Iterator Class.

This class is a PDOStatement decorator to enable its use as an iterator instead of a traversable instance.

Author:
Delespierre
License:
http://www.gnu.org/licenses/lgpl.html Lesser General Public Licence version 3

Definition at line 18 of file axPDOStatementIterator.class.php.


Constructor & Destructor Documentation

axPDOStatementIterator::__construct ( PDOStatement $  statement)

Constructor.

Parameters:
PDOStatement$statement

Definition at line 36 of file axPDOStatementIterator.class.php.


Member Function Documentation

Countable::count() implementation

Get the number of items in the iterator.

Returns:
integer

Definition at line 60 of file axPDOStatementIterator.class.php.

Get the first item.

Returns:
mixed

Definition at line 70 of file axPDOStatementIterator.class.php.

Get the last item.

Returns:
mixed

Definition at line 79 of file axPDOStatementIterator.class.php.

SeekableIterator::seek() Implementation.

Parameters:
integer$positionThe position to seek
Returns:
void

Definition at line 45 of file axPDOStatementIterator.class.php.


Field Documentation

integer axPDOStatementIterator::$_count [protected]

Internal counter.

Definition at line 30 of file axPDOStatementIterator.class.php.

PDOStatement axPDOStatementIterator::$_statement [protected]

Internal statement reference.

Definition at line 24 of file axPDOStatementIterator.class.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables