You are here

public function EasyRdf_Graph::resources in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php \EasyRdf_Graph::resources()

Get an associative array of all the resources stored in the graph. The keys of the array is the URI of the EasyRdf_Resource.

Return value

array Array of EasyRdf_Resource

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php, line 349

Class

EasyRdf_Graph
Container for collection of EasyRdf_Resources.

Code

public function resources() {
  foreach ($this->index as $subject => $properties) {
    if (!isset($this->resources[$subject])) {
      $this
        ->resource($subject);
    }
  }
  foreach ($this->revIndex as $object => $properties) {
    if (!isset($this->resources[$object])) {
      $this
        ->resource($object);
    }
  }
  return $this->resources;
}