You are here

public function EasyRdf_Collection::current in Zircon Profile 8.0

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

Return the current item in the collection

Return value

mixed The current item

File

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

Class

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

Code

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