本文整理汇总了PHP中SMW\DIWikiPage::getDBKey方法的典型用法代码示例。如果您正苦于以下问题:PHP DIWikiPage::getDBKey方法的具体用法?PHP DIWikiPage::getDBKey怎么用?PHP DIWikiPage::getDBKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMW\DIWikiPage
的用法示例。
在下文中一共展示了DIWikiPage::getDBKey方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tryToFindAtLeastOnePropertyTableReferenceFor
private function tryToFindAtLeastOnePropertyTableReferenceFor(DIProperty $property)
{
$resultList = '';
$resultMessage = '';
$resultCount = 0;
$extra = '';
$dataItem = ApplicationFactory::getInstance()->getStore()->getPropertyTableIdReferenceFinder()->tryToFindAtLeastOneReferenceForProperty($property);
if (!$dataItem instanceof DIWikiPage) {
$resultMessage = 'No reference found.';
return array($resultMessage, $resultList, $resultCount);
}
// In case the item has already been marked as deleted but is yet pending
// for removal
if ($dataItem->getInterWiki() === ':smw-delete') {
$resultMessage = 'Item reference "' . $dataItem->getSubobjectName() . '" has already been marked for removal.';
$dataItem = new DIWikiPage($dataItem->getDBKey(), $dataItem->getNamespace());
}
$dataValue = DataValueFactory::getInstance()->newDataValueByItem($dataItem);
$dataValue->setOutputFormat('LOCL');
if ($dataValue->isValid()) {
//$resultMessage = 'Item reference for a zero-marked property.';
$resultList = $dataValue->getShortHtmlText($this->linker) . ' ' . $extra;
$resultCount++;
$resultList .= '  ' . Infolink::newBrowsingLink('+', $dataValue->getLongWikiText())->getHTML($this->linker);
}
return array($resultMessage, $resultList, $resultCount);
}
示例2: updateInterwikiField
/**
* @since 2.1
*
* @param integer $sid
* @param DIWikiPage $subject
* @param integer|string|null $interWiki
*/
public function updateInterwikiField($sid, DIWikiPage $subject, $interWiki = null)
{
$this->store->getConnection()->update(self::tableName, array('smw_iw' => $interWiki !== null ? $interWiki : $subject->getInterWiki()), array('smw_id' => $sid), __METHOD__);
$this->setCache($subject->getDBKey(), $subject->getNamespace(), $subject->getInterWiki(), $subject->getSubobjectName(), $sid, $subject->getSortKey());
}
示例3: getHashIdForDiWikiPage
/**
* @since 2.1
*
* @param DIWikiPage $dataItem
*
* @return string
*/
public static function getHashIdForDiWikiPage(DIWikiPage $dataItem)
{
return self::createFromSegments($dataItem->getDBKey(), $dataItem->getNamespace(), $dataItem->getInterwiki(), $dataItem->getSubobjectName());
}