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

StatementIterator Class v. V0.9.1

Object
StatementIterator

Class: StatementIterator ----------------------------------------------------------------------------------

Iterator for traversing models. This class can be used for iterating forward and backward trough MemModels. It should be instanced using the getIterator() method of a MemModel.

<BR><BR>History:<UL> <LI>08-10-2004 : Class completely rewritten</LI> <LI>03-29-2004 : Problems with adding and removing statements fixed.</LI> <LI>02-21-2003 : First version of this class.</LI> </UL>

AuthorsDaniel Westphal <mail at d-westphal dot de>, Chris Bizer
Properties implemented by StatementIterator
private method model

Reference to the MemModel

private method position

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

Methods implemented by StatementIterator
public method current

PHPstatement current()

Returns the current statement.

Return

or NULL if there is no current statement.

public method getCurrentPosition

PHPinteger getCurrentPosition()

Returns the current position of the iterator.

public method hasNext

PHPboolean hasNext()

Returns TRUE if there are more statements.

public method hasPrevious

PHPboolean hasPrevious()

Returns TRUE if the first statement has not been reached.

public method moveFirst

PHPvoid moveFirst()

Moves the pointer to the first statement.

public method moveLast

PHPvoid moveLast()

Moves the pointer to the last statement.

public method moveTo

PHPvoid moveTo(unknown $position)

Moves the pointer to a specific statement. If you set an off-bounds value, the position will be set to the last element

Arguments

public method next

PHPstatement next()

Returns the next statement.

Return

or NULL if there is no next statement.

public method previous

PHPstatement previous()

Returns the previous statement.

Return

or NULL if there is no previous statement.

constructor StatementIterator

PHPStatementIterator(unknown $model)

Constructor

Arguments

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