本文整理汇总了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" );
}
示例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__);
}
示例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);
}
示例4: appendVariables
public function appendVariables($property)
{
$variables = MagicWord::getVariableIDs();
$this->getResult()->setIndexedTagName($variables, 'v');
return $this->getResult()->addValue('query', $property, $variables);
}
示例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);
}
示例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);
}
示例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;
}