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


PHP SMWDIProperty::m_prop_types方法代码示例

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


在下文中一共展示了SMWDIProperty::m_prop_types方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initPropertyRegistration

 /**
  * Set up predefined properties, including their label, aliases, and
  * typing information.
  */
 protected static function initPropertyRegistration()
 {
     if (is_array(SMWDIProperty::$m_prop_types)) {
         return;
         // init happened before
     }
     global $smwgContLang, $smwgUseCategoryHierarchy;
     $datatypeLabels = $smwgContLang->getDatatypeLabels();
     SMWDIProperty::$m_prop_labels = $smwgContLang->getPropertyLabels() + $datatypeLabels;
     SMWDIProperty::$m_prop_aliases = $smwgContLang->getPropertyAliases() + $smwgContLang->getDatatypeAliases();
     // Setup built-in predefined properties.
     // NOTE: all ids must start with underscores. The translation
     // for each ID, if any, is defined in the language files.
     // Properties without translation cannot be entered by or
     // displayed to users, whatever their "show" value below.
     SMWDIProperty::$m_prop_types = array('_TYPE' => array('__typ', true), '_URI' => array('__spu', true), '_INST' => array('__sin', false), '_UNIT' => array('__sps', true), '_IMPO' => array('__imp', true), '_CONV' => array('__sps', true), '_SERV' => array('__sps', true), '_PVAL' => array('__sps', true), '_REDI' => array('__red', true), '_SUBP' => array('__sup', true), '_SUBC' => array('__suc', !$smwgUseCategoryHierarchy), '_CONC' => array('__con', false), '_MDAT' => array('_dat', false), '_CDAT' => array('_dat', false), '_NEWP' => array('_boo', false), '_LEDT' => array('_wpg', false), '_ERRP' => array('_wpp', false), '_LIST' => array('__pls', true), '_SKEY' => array('__key', false), '_SF_DF' => array('__spf', true), '_SF_AF' => array('__spf', true), '_SOBJ' => array('_wpg', true), '_ASK' => array('_wpg', false), '_ASKST' => array('_cod', true), '_ASKFO' => array('_str', true), '_ASKSI' => array('_num', true), '_ASKDE' => array('_num', true));
     foreach ($datatypeLabels as $typeid => $label) {
         SMWDIProperty::$m_prop_types[$typeid] = array($typeid, true);
     }
     wfRunHooks('smwInitProperties');
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:25,代码来源:SMW_DI_Property.php

示例2: initPropertyRegistration

	/**
	 * Set up predefined properties, including their label, aliases, and
	 * typing information.
	 */
	static protected function initPropertyRegistration() {
		if ( is_array( SMWDIProperty::$m_prop_types ) ) {
			return; // init happened before
		}

		global $smwgContLang, $smwgUseCategoryHierarchy;
		$datatypeLabels = $smwgContLang->getDatatypeLabels();
		SMWDIProperty::$m_prop_labels  = $smwgContLang->getPropertyLabels() + $datatypeLabels;
		SMWDIProperty::$m_prop_aliases = $smwgContLang->getPropertyAliases() + $smwgContLang->getDatatypeAliases();
		// Setup built-in predefined properties.
		// NOTE: all ids must start with underscores. The translation
		// for each ID, if any, is defined in the language files.
		// Properties without translation cannot be entered by or
		// displayed to users, whatever their "show" value below.
		SMWDIProperty::$m_prop_types = array(
				'_TYPE'  =>  array( '__typ', true ), // "has type"
				'_URI'   =>  array( '__spu', true ), // "equivalent URI"
				'_INST'  =>  array( '__sin', false ), // instance of a category
				'_UNIT'  =>  array( '__sps', true ), // "displays unit"
				'_IMPO'  =>  array( '__imp', true ), // "imported from"
				'_CONV'  =>  array( '__sps', true ), // "corresponds to"
				'_SERV'  =>  array( '__sps', true ), // "provides service"
				'_PVAL'  =>  array( '__sps', true ), // "allows value"
				'_REDI'  =>  array( '__red', true ), // redirects to some page
				'_SUBP'  =>  array( '__sup', true ), // "subproperty of"
				'_SUBC'  =>  array( '__suc', !$smwgUseCategoryHierarchy ), // "subcategory of"
				'_CONC'  =>  array( '__con', false ), // associated concept
				'_MDAT'  =>  array( '_dat', false ), // "modification date"
				'_CDAT'  =>  array( '_dat', false ), // "creation date"
				'_ERRP'  =>  array( '_wpp', false ), // "has improper value for"
				'_LIST'  =>  array( '__pls', true ), // "has fields"
				'_SKEY'  =>  array( '__key', false ), // sort key of a page
				'_SF_DF' => array( '__spf', true ), // Semantic Form's default form property
				'_SF_AF' => array( '__spf', true ),  // Semantic Form's alternate form property
				'_SOBJ'  =>  array( '_wpg', true ), // "has subobject"
			);

		foreach ( $datatypeLabels as $typeid => $label ) {
			SMWDIProperty::$m_prop_types[$typeid] = array( $typeid, true );
		}

		wfRunHooks( 'smwInitProperties' );
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:47,代码来源:SMW_DI_Property.php


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