File: rapper.php

package info (click to toggle)
php-easyrdf 1.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 740 kB
  • sloc: php: 7,831; sh: 30; makefile: 8
file content (14 lines) | stat: -rw-r--r-- 289 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php

include_once 'EasyRdf/autoload.php';

EasyRdf\Format::registerSerialiser('dot', 'EasyRdf\Serialiser\Rapper');

$foaf = new \EasyRdf\Graph('http://localhost:10101/foaf.rdf');
$foaf->load();

$data = $foaf->serialise('dot');
if (!is_scalar($data)) {
  exit(1);
}
echo $data, PHP_EOL;