You are here

protected function EasyRdf_Parser_Rdfa::addTriple in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Rdfa.php \EasyRdf_Parser_Rdfa::addTriple()

Add a triple to the current graph, and keep count of the number of triples @ignore

Overrides EasyRdf_Parser::addTriple

2 calls to EasyRdf_Parser_Rdfa::addTriple()
EasyRdf_Parser_Rdfa::generateList in vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Rdfa.php
EasyRdf_Parser_Rdfa::processNode in vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Rdfa.php

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Parser/Rdfa.php, line 66

Class

EasyRdf_Parser_Rdfa
Class to parse RDFa 1.1 with no external dependancies.

Code

protected function addTriple($resource, $property, $value) {
  if ($this->debug) {
    print "Adding triple: {$resource} -> {$property} -> " . $value['type'] . ':' . $value['value'] . "\n";
  }
  $count = $this->graph
    ->add($resource, $property, $value);
  $this->tripleCount += $count;
  return $count;
}