本文整理汇总了PHP中EasyRdf_Graph::getUri方法的典型用法代码示例。如果您正苦于以下问题:PHP EasyRdf_Graph::getUri方法的具体用法?PHP EasyRdf_Graph::getUri怎么用?PHP EasyRdf_Graph::getUri使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EasyRdf_Graph
的用法示例。
在下文中一共展示了EasyRdf_Graph::getUri方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetUri
public function testGetUri()
{
$graph = new EasyRdf_Graph('http://example.com/joe/foaf.rdf');
$this->assertEquals('http://example.com/joe/foaf.rdf', $graph->getUri());
}
示例2: htmlRenderer
public static function htmlRenderer(Graph $graph)
{
static::setContentType('text/html');
return static::htmlSerializer($graph->dump('html'), Standard::$htmlMetadata, $graph->getUri(), null, null, true);
}
示例3: testGetUri
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());
}
示例4: form_tag
<?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'));
?>