public function EasyRdf_Graph::countTriples in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php \EasyRdf_Graph::countTriples()
Calculates the number of triples in the graph
Return value
integer The number of triples in the graph.
File
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Graph.php, line 1582
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;
}