本文整理汇总了PHP中SMW\DIWikiPage::equals方法的典型用法代码示例。如果您正苦于以下问题:PHP DIWikiPage::equals方法的具体用法?PHP DIWikiPage::equals怎么用?PHP DIWikiPage::equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMW\DIWikiPage
的用法示例。
在下文中一共展示了DIWikiPage::equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeDataFrom
/**
* Removes data from the given SMWSemanticData.
* If the subject of the data that is to be removed is not equal to the
* subject of this SMWSemanticData, it will just be ignored (nothing to
* remove). Likewise, removing data that is not present does not change
* anything.
*
* @since 1.8
*
* @param SemanticData $semanticData
*/
public function removeDataFrom(SemanticData $semanticData)
{
if (!$this->mSubject->equals($semanticData->getSubject())) {
return;
}
foreach ($semanticData->getProperties() as $property) {
$values = $semanticData->getPropertyValues($property);
foreach ($values as $dataItem) {
$this->removePropertyObjectValue($property, $dataItem);
}
}
foreach ($semanticData->getSubSemanticData() as $semData) {
$this->removeSubSemanticData($semData);
}
}