本文整理汇总了PHP中MemModel::setbaseURI方法的典型用法代码示例。如果您正苦于以下问题:PHP MemModel::setbaseURI方法的具体用法?PHP MemModel::setbaseURI怎么用?PHP MemModel::setbaseURI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemModel
的用法示例。
在下文中一共展示了MemModel::setbaseURI方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testReify
function testReify()
{
$_SESSION['test'] = 'MemModel reify test';
$model = new MemModel();
$model->setbaseURI("http://www.bizer.de");
$myhomepage = new Resource("http://www.bizer.de/welcome.html");
$creator = new Resource("http://purl.org/dc/elements/1.1/creator");
$me = new Resource("mailto:chris@bizer.de");
$model->add(new Statement($myhomepage, $creator, $me));
$creation_date = new Resource("http://www.example.org/terms/creation-date");
$August16 = new Literal("August 16, 2002");
$model->add(new Statement($myhomepage, $creation_date, $August16));
$language = new Resource("http://www.example.org/terms/language");
$deutsch = new Literal("Deutsch", "de");
$model->add(new Statement($myhomepage, $language, $deutsch));
$model2 =& $model->reify();
$this->assertEqual(12, $model2->size());
}
示例2: MemModel
<title>Test Set Operations</title>
</head>
<body>
<?php
define("RDFAPI_INCLUDE_DIR", "./../api/");
include RDFAPI_INCLUDE_DIR . "RdfAPI.php";
echo "<h3>1. Generate and show two MemModels</h3>";
// Create empty MemModel
$model = new MemModel();
$model->setbaseURI("http://www.bizer.de");
$model2 = new MemModel();
$model2->setbaseURI("http://www.bizer.de/zwei");
// Create nodes and add statements to models
$myhomepage = new Resource("http://www.bizer.de/welcome.html");
$creator = new Resource("http://purl.org/dc/elements/1.1/creator");
$me = new Resource("mailto:chris@bizer.de");
$model->add(new Statement($myhomepage, $creator, $me));
$model2->add(new Statement($myhomepage, $creator, $me));
$creation_date = new Resource("http://www.example.org/terms/creation-date");
$August16 = new Literal("August 16, 2002");
$model->add(new Statement($myhomepage, $creation_date, $August16));
$model2->add(new Statement($myhomepage, $creation_date, $August16));
$language = new Resource("http://www.example.org/terms/language");
$deutsch = new Literal("Deutsch", "de");
$model->add(new Statement($myhomepage, $language, $deutsch));
$name = new Resource("http://www.example.org/terms/Name");
$chrisbizer = new Literal("Chris Bizer");