RDQL
[ class tree: RDQL ] [ index: RDQL ] [ all elements ]

Class: RDF_RDQL_ResultIterator

Source Location: /RDF_RDQL-0.2.0/RDF/RDQL/ResultIterator.php

Class Overview

RDF_Object
   |
   --RDF_RDQL_ResultIterator

Iterator for traversing RDQL results.


Author(s):

Version:

  • V0.7

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 15]
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 Model_Memory or a Model_MDB.

  • Author: Daniel Westphal <mail@d-westphal.de>, Chris Bizer <chris@bizer.de>
  • Version: V0.7
  • Access: public


[ Top ]


Class Variables

$position =

[line 33]

Current position RDQLResultIterator does not use the build in PHP array iterator, so you can use serveral iterators on a single RDQL result.
  • Access: protected

Type:   integer


[ Top ]

$RDQLResult =

[line 23]

Reference to the RDQL result
  • Var: RDQLResult
  • Access: protected

Type:   array


[ Top ]



Method Detail

RDF_RDQL_ResultIterator (Constructor)   [line 39]

RDF_RDQL_ResultIterator RDF_RDQL_ResultIterator( object RDQLResult &$RDQLResult)

  • Access: public

Parameters:

object RDQLResult   &$RDQLResult   — 

[ Top ]

countResults   [line 77]

integer countResults( )

Returns the number of results.
  • Access: public

[ Top ]

current   [line 161]

result current( [integer $element = null])

Returns the current result.
  • Return: array OR single result if $element was specified OR null if there is no next result.
  • Access: public

Parameters:

integer   $element   — 

[ Top ]

getCurrentPosition   [line 214]

integer getCurrentPosition( )

Returns the current position of the iterator.
  • Access: public

[ Top ]

getResultLabels   [line 62]

array getResultLabels( )

Returns the labels of the result as array.
  • Return: of strings with the result labels OR null if there are no results.
  • Access: public

[ Top ]

hasNext   [line 88]

boolean hasNext( )

Returns TRUE if there are more results.
  • Access: public

[ Top ]

hasPrevious   [line 103]

boolean hasPrevious( )

Returns TRUE if the first result has not been reached.
  • Access: public

[ Top ]

moveFirst   [line 180]

void moveFirst( )

Moves the pointer to the first result.
  • Access: public

[ Top ]

moveLast   [line 191]

void moveLast( )

Moves the pointer to the last result.
  • Access: public

[ Top ]

moveTo   [line 203]

void moveTo( $position)

Moves the pointer to a specific result.

If you set an off-bounds value, next(), previous() and current() will return null

  • Access: public

Parameters:

   $position   — 

[ Top ]

next   [line 119]

result next( [integer $element = null])

Returns the next result array.
  • Return: array OR single result if $element was specified OR null if there is no next result.
  • Access: public

Parameters:

integer   $element   — 

[ Top ]

previous   [line 140]

result previous( [integer $element = null])

Returns the previous result.
  • Return: array OR single result if $element was specified OR null if there is no next result.
  • Access: public

Parameters:

integer   $element   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:39:50 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.