当前位置: 首页>>代码示例>>PHP>>正文


PHP SMWDataValueFactory::mTypeLabels方法代码示例

本文整理汇总了PHP中SMWDataValueFactory::mTypeLabels方法的典型用法代码示例。如果您正苦于以下问题:PHP SMWDataValueFactory::mTypeLabels方法的具体用法?PHP SMWDataValueFactory::mTypeLabels怎么用?PHP SMWDataValueFactory::mTypeLabels使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SMWDataValueFactory的用法示例。


在下文中一共展示了SMWDataValueFactory::mTypeLabels方法的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');
 }
开发者ID:yusufchang,项目名称:app,代码行数:22,代码来源:SMW_DataValueFactory.php


注:本文中的SMWDataValueFactory::mTypeLabels方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。