本文整理匯總了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;
}