public function EasyRdf_Graph::parseFile

Parse a file containing RDF data into the graph object.

Parameters

string $filename The path of the file to load:

string $format Optional format of the file:

string $uri The URI of the file to load:

Return value

integer The number of triples added to the graph

File

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

Class

EasyRdf_Graph
Container for collection of EasyRdf_Resources.

Code

public function parseFile($filename, $format = null, $uri = null) {
  if ($uri === null) {
    $uri = "file://{$filename}";
  }
  return $this
    ->parse(file_get_contents($filename), $format, $uri);
}