Class StatementIterator

Description

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.

Located in /util/StatementIterator.php (line 20)

Object
   |
   --StatementIterator
Method Summary
StatementIterator StatementIterator (object MemModel &$model)
statement current ()
integer getCurrentPosition ()
boolean hasNext ()
boolean hasPrevious ()
void moveFirst ()
void moveLast ()
void moveTo (integer $position)
statement next ()
statement previous ()
Methods
Constructor StatementIterator (line 45)

Constructor

  • access: public
StatementIterator StatementIterator (object MemModel &$model)
  • object MemModel &$model
current (line 144)

Returns the current statement.

  • return: or NULL if there is no current statement.
  • access: public
statement current ()
getCurrentPosition (line 202)

Returns the current position of the iterator.

  • access: public
integer getCurrentPosition ()
hasNext (line 56)

Returns TRUE if there are more statements.

  • access: public
boolean hasNext ()
hasPrevious (line 84)

Returns TRUE if the first statement has not been reached.

  • access: public
boolean hasPrevious ()
moveFirst (line 159)

Moves the pointer to the first statement.

  • access: public
void moveFirst ()
moveLast (line 169)

Moves the pointer to the last statement.

  • access: public
void moveLast ()
moveTo (line 181)

Moves the pointer to a specific statement.

If you set an off-bounds value, the position will be set to the last element

  • access: public
void moveTo (integer $position)
  • integer $position
next (line 100)

Returns the next statement.

  • return: or NULL if there is no next statement.
  • access: public
statement next ()
previous (line 129)

Returns the previous statement.

  • return: or NULL if there is no previous statement.
  • access: public
statement previous ()

Inherited Methods

Inherited From Object

Object::toString()

Documentation generated on Fri, 1 Jun 2007 16:52:30 +0200 by phpDocumentor 1.3.2