Class LibRDF_BindingsQueryResults

Description

A specialized librdf_query_results wrapper for bindings results.

Bindings are returned by SELECT statements and associate result nodes with names for each tuple in the result set. For example, the query

SELECT ?book, ?author WHERE (?book, dc:creator, ?author)<br> USING dc for <http://purl.org/dc/elements/1.1/>"

in RDQL would result in a set of tuples, each containing a value for "author" and "book". This results of iterating over this object are associative arrays of the result names and values. The iterator cannot be rewound.

Located in /QueryResults.php (line 449)

LibRDF_QueryResults
   |
   --LibRDF_BindingsQueryResults
Method Summary
void __construct (resource $query_results)
array current ()
integer key ()
void next ()
void rewind ()
boolean valid ()
Variables

Inherited Variables

Inherited from LibRDF_QueryResults

LibRDF_QueryResults::$query_results
Methods
Constructor __construct (line 476)

Create a new bindings query result object.

  • access: public
  • throws: LibRDF_Error If unable to wrap the query results
void __construct (resource $query_results)
  • resource $query_results: The query results to wrap
current (line 514)

Return the current tuple of bindings.

The result is an associative array using the binding names as the indices.

  • return: The current bindings tuple
  • access: public
  • throws: LibRDF_Error If unable to get the current bindings tuple
array current ()
key (line 545)

Return the current key.

  • return: The current key
  • access: public
integer key ()
next (line 556)

Advance the iterator.

  • access: public
void next ()
rewind (line 497)

Rewind the iterator.

Rewinding is not supported, so this function will invalidate the iterator unless it is still in the initial (rewound) position.

  • access: public
void rewind ()
valid (line 575)

Return whether the iterator is still valid.

  • return: Whether the iterator is valid
  • access: public
boolean valid ()

Inherited Methods

Inherited From LibRDF_QueryResults

LibRDF_QueryResults::makeQueryResults()
LibRDF_QueryResults::to_string()
LibRDF_QueryResults::__clone()
LibRDF_QueryResults::__destruct()
LibRDF_QueryResults::__toString()

Documentation generated on Thu, 15 Jun 2006 19:25:13 -0400 by phpDocumentor 1.3.0