本文整理汇总了PHP中SMW\DIProperty::getPredefinedPropertyTypeId方法的典型用法代码示例。如果您正苦于以下问题:PHP DIProperty::getPredefinedPropertyTypeId方法的具体用法?PHP DIProperty::getPredefinedPropertyTypeId怎么用?PHP DIProperty::getPredefinedPropertyTypeId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMW\DIProperty
的用法示例。
在下文中一共展示了DIProperty::getPredefinedPropertyTypeId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildPropertyTablesForSpecialProperties
/**
* @param array $specialProperties
*/
private function buildPropertyTablesForSpecialProperties(array $specialProperties)
{
foreach ($specialProperties as $propertyKey) {
$this->addPropertyTable(DataTypeRegistry::getInstance()->getDataItemId(DIProperty::getPredefinedPropertyTypeId($propertyKey)), $this->getTablePrefix() . strtolower($propertyKey), $propertyKey);
}
// Redirect table uses another subject scheme for historic reasons
// TODO This should be changed if possible
$redirectTableName = $this->getTablePrefix() . '_redi';
if (isset($this->propertyTables[$redirectTableName])) {
$this->propertyTables[$redirectTableName]->setUsesIdSubject(false);
}
}
示例2: isRegisteredPropertyId
protected function isRegisteredPropertyId($propertyId, $cachedProperties)
{
return DIProperty::getPredefinedPropertyTypeId($propertyId) === '' || array_key_exists($propertyId, $cachedProperties);
}
示例3: addTableDefinitionForFixedProperties
/**
* @param array $properties
*/
private function addTableDefinitionForFixedProperties(array $properties)
{
foreach ($properties as $propertyKey => $propetyTableSuffix) {
// Either as plain index array containing the property key or as associated
// array with property key => tableSuffix
$propertyKey = is_int($propertyKey) ? $propetyTableSuffix : $propertyKey;
$this->addPropertyTable(DataTypeRegistry::getInstance()->getDataItemId(DIProperty::getPredefinedPropertyTypeId($propertyKey)), $this->fixedPropertyTablePrefix . strtolower($propetyTableSuffix), $propertyKey);
}
}