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(); };



History: <LI>10-07-2004 : First version of this class.</LI>

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


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

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, object ResModel &$associatedModel, [string $returnType = false])
current (line 177)

Returns the current item

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

Returns the key of the current item

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

Moves Iterator to the next item in the list

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

Resets iterator list to start

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

Sets that only Liertals with the matching language should be returned

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

Says if there are additional items left in the list

  • access: public
boolean valid ()

Documentation generated on Fri, 17 Dec 2004 16:17:49 +0100 by phpDocumentor 1.3.0RC3