Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

PHPTAL_DBResultIterator Class Reference

Inheritance diagram for PHPTAL_DBResultIterator:

Inheritance graph
[legend]
Collaboration diagram for PHPTAL_DBResultIterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PHPTAL_DBResultIterator (&$result)
 reset ()
 size ()
 isValid ()
next ()
value ()
 index ()

Public Attributes

 $_src
 $_index = -1
 $_end = false
 $_value

Detailed Description

Iterator for DB_Result PEAR object.

This class is an implementation of the Iterator Interface for DB_Result objects produced by the usage of PEAR::DB package.

Author:
Laurent Bedubourg <laurent.bedubourg@free.fr>

Definition at line 269 of file LoopControler.php.


Constructor & Destructor Documentation

PHPTAL_DBResultIterator::PHPTAL_DBResultIterator &$  result  ) 
 

Iterator constructor.

Parameters:
DB_Result $result The query result.

Definition at line 282 of file LoopControler.php.

References reset().


Member Function Documentation

PHPTAL_DBResultIterator::index  ) 
 

Return current row index in resultset.

Returns:
int

Reimplemented from Iterator.

Definition at line 358 of file LoopControler.php.

PHPTAL_DBResultIterator::isValid  ) 
 

Returns true if end of iterator has not been reached yet.

Reimplemented from Iterator.

Definition at line 317 of file LoopControler.php.

& PHPTAL_DBResultIterator::next  ) 
 

Return the next row in this result.

This method calls fetchRow() on the DB_Result, the return type depends of the DB_result->fetchmod. Please specify it before executing the template.

Returns:
mixed

Reimplemented from Iterator.

Definition at line 331 of file LoopControler.php.

References size().

PHPTAL_DBResultIterator::reset  ) 
 

Reset iterator to first item.

This method should throw an exception for once only iterators.

Exceptions:
ResetFailed 

Reimplemented from Iterator.

Definition at line 288 of file LoopControler.php.

References size().

Referenced by PHPTAL_DBResultIterator().

PHPTAL_DBResultIterator::size  ) 
 

Return the number of rows in this result.

Returns:
int

Definition at line 306 of file LoopControler.php.

Referenced by next(), and reset().

& PHPTAL_DBResultIterator::value  ) 
 

Return current row.

Returns:
mixed

Reimplemented from Iterator.

Definition at line 348 of file LoopControler.php.


Member Data Documentation

PHPTAL_DBResultIterator::$_end = false
 

Definition at line 273 of file LoopControler.php.

PHPTAL_DBResultIterator::$_index = -1
 

Definition at line 272 of file LoopControler.php.

PHPTAL_DBResultIterator::$_src
 

Definition at line 271 of file LoopControler.php.

PHPTAL_DBResultIterator::$_value
 

Definition at line 274 of file LoopControler.php.


The documentation for this class was generated from the following file:
Generated on Tue Jun 29 23:40:58 2004 for Mediawiki by doxygen 1.3.7