public function EasyRdf_Graph::countTriples

Calculates the number of triples in the graph

Return value

integer The number of triples in the graph.

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php, line 1546

Class

EasyRdf_Graph
Container for collection of EasyRdf_Resources.

Code

public function countTriples() {
  $count = 0;
  foreach ($this->index as $resource) {
    foreach ($resource as $property => $values) {
      $count += count($values);
    }
  }
  return $count;
}