You are here

protected function EasyRdf_Serialiser_Turtle::serialisePrefixes in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Turtle.php \EasyRdf_Serialiser_Turtle::serialisePrefixes()

@ignore

1 call to EasyRdf_Serialiser_Turtle::serialisePrefixes()
EasyRdf_Serialiser_Turtle::serialise in vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Turtle.php
Serialise an EasyRdf_Graph to Turtle.

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/Turtle.php, line 275

Class

EasyRdf_Serialiser_Turtle
Class to serialise an EasyRdf_Graph to Turtle with no external dependancies.

Code

protected function serialisePrefixes() {
  $turtle = '';
  foreach ($this->prefixes as $prefix => $count) {
    $url = EasyRdf_Namespace::get($prefix);
    $turtle .= "@prefix {$prefix}: <{$url}> .\n";
  }
  return $turtle;
}