本文整理汇总了PHP中Resource::getLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP Resource::getLabel方法的具体用法?PHP Resource::getLabel怎么用?PHP Resource::getLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resource
的用法示例。
在下文中一共展示了Resource::getLabel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toString
/**
* Return a human-readable (sort of) string "graphname { s p o . }"
* describing the quad.
*
* @return string
*/
function toString()
{
return 'GraphName(' . $this->graphName->getLabel() . ') ' . $this->statement->toString();
}
示例2: Statement
var_dump($_REQUEST["otripleObject"]);
print "-->";
$os = new Statement($s, $p, $o);
$m->remove($os);
$s = new Resource($_REQUEST["tripleSubject"]);
$p = new Resource($_REQUEST["triplePredicate"]);
if ($_REQUEST["literal"]) {
$o = new Literal($_REQUEST["tripleObject"]);
} else {
$o = new Resource($_REQUEST["tripleObject"]);
}
$m->add(new Statement($s, $p, $o));
//invalidate triples cached in session:
$_SESSION["triples"] = FALSE;
print "<h1>Updated statement</h1>\n";
print "<p>(" . htmlspecialchars($s->getLabel()) . ", " . htmlspecialchars($p->getLabel()) . ", " . htmlspecialchars($o->getLabel()) . ")</p>\n";
print "<hr/>\n";
}
?>
<?php
} else {
?>
<h1>Query <?php
print $muri;
?>
</h1>
<h2>RDQL:</h2>
示例3: containsQuad
/**
* Tells wether the Dataset contains a quad or
* quads matching a pattern.
*
* @param Resource $graphName
* @param Resource $subject
* @param Resource $predicate
* @param Resource $object
* @return boolean
*/
function containsQuad($graphName, $subject, $predicate, $object)
{
if ($graphName != null) {
if ($this->containsNamedGraph($graphName->getLabel()) !== true) {
return false;
}
return $this->graphs[$graphName->getLabel()]->findFirstMatchingStatement($subject, $predicate, $object) != null;
}
foreach ($this->graphs as $graph) {
if ($graph->findFirstMatchingStatement($subject, $predicate, $object) != null) {
return true;
}
}
return false;
}