public function testGetUri() { $graph = new EasyRdf_Graph('http://example.com/joe/foaf.rdf'); $this->assertEquals('http://example.com/joe/foaf.rdf', $graph->getUri()); }
public static function htmlRenderer(Graph $graph) { static::setContentType('text/html'); return static::htmlSerializer($graph->dump('html'), Standard::$htmlMetadata, $graph->getUri(), null, null, true); }
public function testGetUri() { $data = readFixture('foaf.json'); $graph = new EasyRdf_Graph('http://example.com/joe/foaf.rdf', $data); $this->assertEquals('http://example.com/joe/foaf.rdf', $graph->getUri()); }
<?php echo form_tag(); echo text_field_tag('uri', 'http://www.aelius.com/njh/foaf.rdf', array('size' => 50)); echo submit_tag(); echo form_end_tag(); ?> <?php if (isset($_REQUEST['uri'])) { $graph = new EasyRdf_Graph($_REQUEST['uri']); if ($graph) { if ($graph->type() == 'foaf:PersonalProfileDocument') { $person = $graph->primaryTopic(); } else { if ($graph->type() == 'foaf:Person') { $person = $graph->resource($graph->getUri()); } } } } if (isset($person)) { ?> <dl> <dt>Name:</dt><dd><?php echo $person->get('foaf:name'); ?> </dd> <dt>Homepage:</dt><dd><?php echo link_to($person->get('foaf:homepage')); ?>