本文整理汇总了PHP中EasyRdf_Namespace::setDefault方法的典型用法代码示例。如果您正苦于以下问题:PHP EasyRdf_Namespace::setDefault方法的具体用法?PHP EasyRdf_Namespace::setDefault怎么用?PHP EasyRdf_Namespace::setDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EasyRdf_Namespace
的用法示例。
在下文中一共展示了EasyRdf_Namespace::setDefault方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testExpandWithoutDefault
public function testExpandWithoutDefault()
{
EasyRdf_Namespace::setDefault(null);
$this->assertSame('unknown', EasyRdf_Namespace::expand('unknown'));
}
示例2: set_include_path
<?php
/**
* Example of reading Open Graph Protocol properties
*
* @package EasyRdf
* @copyright Copyright (c) 2012-2013 Nicholas J Humfrey
* @license http://unlicense.org/
*/
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/');
require_once "EasyRdf.php";
EasyRdf_Namespace::setDefault('dc11');
?>
<html>
<head>
<title>Open Graph Protocol example</title>
</head>
<body>
<?php
$doc = EasyRdf_Graph::newAndLoad('http://www.rottentomatoes.com/m/10011268-oceans/');
?>
<p>
Title: <?php
echo $doc->title;
?>
<br />
Creator: <?php
echo $doc->creator;
?>
示例3: testMagicUnset
public function testMagicUnset()
{
$this->setupTestGraph();
EasyRdf_Namespace::setDefault('rdf');
$this->resource->add('rdf:testMagicUnset', 'testMagicUnset');
unset($this->resource->testMagicUnset);
$this->assertStringEquals(null, $this->resource->get('rdf:testMagicUnset'));
}
示例4: testMagicUnset
public function testMagicUnset()
{
EasyRdf_Namespace::setDefault('rdf');
$this->graph->add($this->graph->getUri(), 'rdf:test', 'testMagicUnset');
unset($this->graph->test);
$this->assertStringEquals(null, $this->graph->get($this->graph->getUri(), 'rdf:test'));
}