Class ResIterator

Description

Implementation of a resource iterator.

This Iterator should be used in a for-loop like: $it = $ontClass->listInstances(); for ($it->rewind(); $it->valid(); $it->next()) { $currentResource=$it->current(); };

Located in /resModel/ResIterator.php (line 29)


	
			
Method Summary
ResIterator ResIterator (object ResResource $subject, object ResResource $predicate, object ResResource $object, string $getSPO,  &$associatedModel, [string $returnType = false], object ResModel $associatedModel)
mixed current ()
integer key ()
void next ()
void rewind ()
void setFindLiteralWithLang (string $language)
boolean valid ()
Methods
Constructor ResIterator (line 125)

Constructor.

$subject, $predicate, and $object are used like inf find(). $getSPO supports the strings 's', 'p', and 'o' to return either the subject, predicate, or object of the result statements. $returnType supports the strings 'ResProperty', 'ResLiteral', 'OntProperty', 'OntClass', and 'Individual' and returns the resources as the matching type.

  • access: public
ResIterator ResIterator (object ResResource $subject, object ResResource $predicate, object ResResource $object, string $getSPO,  &$associatedModel, [string $returnType = false], object ResModel $associatedModel)
current (line 175)

Returns the current item

  • access: public
mixed current ()
key (line 238)

Returns the key of the current item

  • access: public
integer key ()
next (line 163)

Moves Iterator to the next item in the list

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

Resets iterator list to start

  • access: public
void rewind ()
setFindLiteralWithLang (line 250)

Sets that only Literals with the matching language should be returned

  • access: public
void setFindLiteralWithLang (string $language)
  • string $language
valid (line 153)

Says if there are additional items left in the list

  • access: public
boolean valid ()

Documentation generated on Fri, 1 Jun 2007 16:51:25 +0200 by phpDocumentor 1.3.2