本文整理汇总了PHP中SMWDataValueFactory::mTypeClasses方法的典型用法代码示例。如果您正苦于以下问题:PHP SMWDataValueFactory::mTypeClasses方法的具体用法?PHP SMWDataValueFactory::mTypeClasses怎么用?PHP SMWDataValueFactory::mTypeClasses使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMWDataValueFactory
的用法示例。
在下文中一共展示了SMWDataValueFactory::mTypeClasses方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initDatatypes
/**
* Gather all available datatypes and label<=>id<=>datatype
* associations. This method is called before most methods of this
* factory.
*/
protected static function initDatatypes()
{
global $smwgContLang;
if (is_array(self::$mTypeLabels)) {
return;
// init happened before
}
self::$mTypeLabels = $smwgContLang->getDatatypeLabels();
self::$mTypeAliases = $smwgContLang->getDatatypeAliases();
// Setup built-in datatypes.
// NOTE: all ids must start with underscores, where two underscores indicate
// truly internal (non user-acessible types). All others should also get a
// translation in the language files, or they won't be available for users.
self::$mTypeClasses = array('_txt' => 'SMWStringValue', '_cod' => 'SMWStringValue', '_str' => 'SMWStringValue', '_ema' => 'SMWURIValue', '_uri' => 'SMWURIValue', '_anu' => 'SMWURIValue', '_tel' => 'SMWURIValue', '_wpg' => 'SMWWikiPageValue', '_wpp' => 'SMWWikiPageValue', '_wpc' => 'SMWWikiPageValue', '_wpf' => 'SMWWikiPageValue', '_num' => 'SMWNumberValue', '_tem' => 'SMWTemperatureValue', '_dat' => 'SMWTimeValue', '_boo' => 'SMWBoolValue', '_rec' => 'SMWRecordValue', '_qty' => 'SMWQuantityValue', '__typ' => 'SMWTypesValue', '__pls' => 'SMWPropertyListValue', '__con' => 'SMWConceptValue', '__sps' => 'SMWStringValue', '__spu' => 'SMWURIValue', '__sup' => 'SMWWikiPageValue', '__suc' => 'SMWWikiPageValue', '__spf' => 'SMWWikiPageValue', '__sin' => 'SMWWikiPageValue', '__red' => 'SMWWikiPageValue', '__err' => 'SMWErrorValue', '__imp' => 'SMWImportValue', '__pro' => 'SMWPropertyValue', '__key' => 'SMWStringValue');
self::$mTypeDataItemIds = array('_txt' => SMWDataItem::TYPE_BLOB, '_cod' => SMWDataItem::TYPE_BLOB, '_str' => SMWDataItem::TYPE_STRING, '_ema' => SMWDataItem::TYPE_URI, '_uri' => SMWDataItem::TYPE_URI, '_anu' => SMWDataItem::TYPE_URI, '_tel' => SMWDataItem::TYPE_URI, '_wpg' => SMWDataItem::TYPE_WIKIPAGE, '_wpp' => SMWDataItem::TYPE_WIKIPAGE, '_wpc' => SMWDataItem::TYPE_WIKIPAGE, '_wpf' => SMWDataItem::TYPE_WIKIPAGE, '_num' => SMWDataItem::TYPE_NUMBER, '_tem' => SMWDataItem::TYPE_NUMBER, '_dat' => SMWDataItem::TYPE_TIME, '_boo' => SMWDataItem::TYPE_BOOLEAN, '_rec' => SMWDataItem::TYPE_WIKIPAGE, '_geo' => SMWDataItem::TYPE_GEO, '_gpo' => SMWDataItem::TYPE_BLOB, '_qty' => SMWDataItem::TYPE_NUMBER, '__typ' => SMWDataItem::TYPE_URI, '__pls' => SMWDataItem::TYPE_STRING, '__con' => SMWDataItem::TYPE_CONCEPT, '__sps' => SMWDataItem::TYPE_STRING, '__spu' => SMWDataItem::TYPE_URI, '__sup' => SMWDataItem::TYPE_WIKIPAGE, '__suc' => SMWDataItem::TYPE_WIKIPAGE, '__spf' => SMWDataItem::TYPE_WIKIPAGE, '__sin' => SMWDataItem::TYPE_WIKIPAGE, '__red' => SMWDataItem::TYPE_WIKIPAGE, '__err' => SMWDataItem::TYPE_ERROR, '__imp' => SMWDataItem::TYPE_STRING, '__pro' => SMWDataItem::TYPE_PROPERTY, '__key' => SMWDataItem::TYPE_STRING);
wfRunHooks('smwInitDatatypes');
}