You are here

public function EasyRdf_Collection::next in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Collection.php \EasyRdf_Collection::next()

Move forward to next item in the collection

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Collection.php, line 128

Class

EasyRdf_Collection
Sub-class of EasyRdf_Resource that represents an RDF collection (rdf:List)

Code

public function next() {
  if ($this->position === 1) {
    $this->current = $this
      ->get('rdf:rest');
  }
  elseif ($this->current) {
    $this->current = $this->current
      ->get('rdf:rest');
  }
  $this->position++;
}