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


PHP MagicWord::getVariableIDs方法代码示例

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


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

示例1: execute

	public function execute() {
		$this->batchsize = $this->getOption( 'batchsize', 50 );
		$variableIDs = MagicWord::getVariableIDs();
		foreach ( $variableIDs as $id ) {
			$magic = MagicWord::get( $id );
			foreach ( $magic->getSynonyms() as $synonym ) {
				$this->processSynonym( $synonym );
			}
		}
		$this->output( "All done\n" );
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:11,代码来源:cleanupBug31576.php

示例2: initialiseVariables

 /**
  * initialise the magic variables (like CURRENTMONTHNAME) and substitution modifiers
  *
  * @private
  */
 function initialiseVariables()
 {
     wfProfileIn(__METHOD__);
     $variableIDs = MagicWord::getVariableIDs();
     $substIDs = MagicWord::getSubstIDs();
     $this->mVariables = new MagicWordArray($variableIDs);
     $this->mSubstWords = new MagicWordArray($substIDs);
     wfProfileOut(__METHOD__);
 }
开发者ID:Tarendai,项目名称:spring-website,代码行数:14,代码来源:Parser.php

示例3: initialiseVariables

 /**
  * initialise the magic variables (like CURRENTMONTHNAME) and substitution modifiers
  *
  * @private
  */
 public function initialiseVariables()
 {
     $variableIDs = MagicWord::getVariableIDs();
     $substIDs = MagicWord::getSubstIDs();
     $this->mVariables = new MagicWordArray($variableIDs);
     $this->mSubstWords = new MagicWordArray($substIDs);
 }
开发者ID:rrameshs,项目名称:mediawiki,代码行数:12,代码来源:Parser.php

示例4: appendVariables

 public function appendVariables($property)
 {
     $variables = MagicWord::getVariableIDs();
     $this->getResult()->setIndexedTagName($variables, 'v');
     return $this->getResult()->addValue('query', $property, $variables);
 }
开发者ID:Tarendai,项目名称:spring-website,代码行数:6,代码来源:ApiQuerySiteinfo.php

示例5: initialiseVariables

 /**
  * initialise the magic variables (like CURRENTMONTHNAME)
  *
  * @private
  */
 function initialiseVariables()
 {
     $fname = 'Parser::initialiseVariables';
     wfProfileIn($fname);
     $variableIDs = MagicWord::getVariableIDs();
     $this->mVariables = new MagicWordArray($variableIDs);
     wfProfileOut($fname);
 }
开发者ID:renemilk,项目名称:spring-website,代码行数:13,代码来源:Parser.php

示例6: initialiseVariables

 /**
  * initialise the magic variables (like CURRENTMONTHNAME)
  *
  * @private
  */
 function initialiseVariables()
 {
     $fname = 'Parser::initialiseVariables';
     wfProfileIn($fname);
     $variableIDs = MagicWord::getVariableIDs();
     $this->mVariables = array();
     foreach ($variableIDs as $id) {
         $mw =& MagicWord::get($id);
         $mw->addToArray($this->mVariables, $id);
     }
     wfProfileOut($fname);
 }
开发者ID:Jobava,项目名称:diacritice-meta-repo,代码行数:17,代码来源:Parser_OldPP.php

示例7: getMagicWords

 /**
  * Return list of magic words ({{PAGENAME}}) and double underscores (__TOC__)
  */
 public static function getMagicWords()
 {
     wfProfileIn(__METHOD__);
     // magic words list
     $magicWords = MagicWord::getVariableIDs();
     // double underscore magic words list (RT #18631)
     $magicWordsUnderscore = MagicWord::$mDoubleUnderscoreIDs;
     // filter MAG_NOWYSIWYG and MAG_NOSHAREDHELP out from the list (RT #18631)
     // and add to the list of double underscore magic words
     $magicWords = array_flip($magicWords);
     foreach ($magicWords as $magic => $tmp) {
         if (substr($magic, 0, 4) == 'MAG_') {
             unset($magicWords[$magic]);
             $magicWordsUnderscore[] = strtolower(substr($magic, 4));
         }
     }
     $magicWords = array_flip($magicWords);
     // merge and sort magic words / double underscores lists, in RTE check type of magic word by searching $magicWordUnderscore list
     $magicWords = array_merge($magicWords, $magicWordsUnderscore);
     sort($magicWords);
     sort($magicWordsUnderscore);
     $ret = array('magicWords' => $magicWords, 'doubleUnderscores' => $magicWordsUnderscore);
     wfProfileOut(__METHOD__);
     return $ret;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:28,代码来源:RTE.class.php


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