[ Expand All ] [ Collapse All ] - [ Properties (2) ] [ Methods (12) ] - [ Legend ]

RdqlResultIterator Class v. V0.9.1

Object
RdqlResultIterator

Class: RdqlResultIterator ----------------------------------------------------------------------------------

Iterator for traversing Rdql results. This class can be used for iterating forward and backward trough Rdql results. It should be instanced using the rdqlQueryAsIterator() method of a MemModel or a DBModel.

<BR><BR>History:<UL> <LI>25-03-2004 : Bug in the handling of empty results fixed ( radol@gmx.de ).</LI> <LI>11-06-2003 : First version of this class.</LI> </UL>

AuthorDaniel Westphal <mail@d-westphal.de>, Chris Bizer
Properties implemented by RdqlResultIterator
private method position

Current position RdqlResultIterator does not use the build in PHP array iterator, so you can use serveral iterators on a single Rdql result.

private method RdqlResult

Reference to the Rdql result

Methods implemented by RdqlResultIterator
public method countResults

PHPinteger countResults()

Returns the number of results.

public method current

PHPresult current(integer $element)

Returns the current result.

Arguments

Return

array OR single result if $element was specified OR NULL if there is no next result.

public method getCurrentPosition

PHPinteger getCurrentPosition()

Returns the current position of the iterator.

public method getResultLabels

PHParray getResultLabels()

Returns the labels of the result as array.

Return

of strings with the result labels OR null if there are no results.

public method hasNext

PHPboolean hasNext()

Returns TRUE if there are more results.

public method hasPrevious

PHPboolean hasPrevious()

Returns TRUE if the first result has not been reached.

public method moveFirst

PHPvoid moveFirst()

Moves the pointer to the first result.

public method moveLast

PHPvoid moveLast()

Moves the pointer to the last result.

public method moveTo

PHPvoid moveTo(unknown $position)

Moves the pointer to a specific result. If you set an off-bounds value, next(), previous() and current() will return NULL

Arguments

public method next

PHPresult next(integer $element)

Returns the next result array.

Arguments

Return

array OR single result if $element was specified OR NULL if there is no next result.

public method previous

PHPresult previous(integer $element)

Returns the previous result.

Arguments

Return

array OR single result if $element was specified OR NULL if there is no next result.

constructor RdqlResultIterator

PHPRdqlResultIterator(unknown $RdqlResult)

Constructor

Arguments

Generated by PHPEdit - Copyright © 1999-2004 - Sébastien Hordeaux - WaterProof SARL