本文整理汇总了PHP中ApiMain::makeHelpMsgHeader方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiMain::makeHelpMsgHeader方法的具体用法?PHP ApiMain::makeHelpMsgHeader怎么用?PHP ApiMain::makeHelpMsgHeader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApiMain
的用法示例。
在下文中一共展示了ApiMain::makeHelpMsgHeader方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeHelpMsgHelper
/**
* For all modules in $moduleList, generate help messages and join them together
* @param $moduleList Array array(modulename => classname)
* @param $paramName string Parameter name
* @return string
*/
private function makeHelpMsgHelper($moduleList, $paramName)
{
$moduleDescriptions = array();
foreach ($moduleList as $moduleName => $moduleClass) {
$module = new $moduleClass($this, $moduleName, null);
$msg = ApiMain::makeHelpMsgHeader($module, $paramName);
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false) {
$msg .= $msg2;
}
$moduleDescriptions[] = $msg;
}
return implode("\n", $moduleDescriptions);
}
示例2: makeHelpMsgHelper
/**
* For all modules of a given group, generate help messages and join them together
* @param string $group Module group
* @return string
*/
private function makeHelpMsgHelper($group)
{
$moduleDescriptions = array();
$moduleNames = $this->mModuleMgr->getNames($group);
sort($moduleNames);
foreach ($moduleNames as $name) {
/**
* @var $module ApiQueryBase
*/
$module = $this->mModuleMgr->getModule($name);
$msg = ApiMain::makeHelpMsgHeader($module, $group);
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false) {
$msg .= $msg2;
}
if ($module instanceof ApiQueryGeneratorBase) {
$msg .= "Generator:\n This module may be used as a generator\n";
}
$moduleDescriptions[] = $msg;
}
return implode("\n", $moduleDescriptions);
}
示例3: makeHelpMsgHelper
/**
* For all modules in $moduleList, generate help messages and join them together
* @param $moduleList Array array(modulename => classname)
* @param $paramName string Parameter name
* @return string
*/
private function makeHelpMsgHelper($moduleList, $paramName)
{
$moduleDescriptions = array();
foreach ($moduleList as $moduleName => $moduleClass) {
$module = new $moduleClass($this, $moduleName, null);
$msg = ApiMain::makeHelpMsgHeader($module, $paramName);
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false) {
$msg .= $msg2;
}
if ($module instanceof ApiQueryGeneratorBase) {
$this->mAllowedGenerators[] = $moduleName;
$msg .= "Generator:\n This module may be used as a generator\n";
}
$moduleDescriptions[] = $msg;
}
return implode("\n", $moduleDescriptions);
}
示例4: buildModuleHelp
/**
* @param $module ApiBase
* @param $type String What type of request is this? e.g. action, query, list, prop, meta, format
* @return string
*/
private function buildModuleHelp($module, $type)
{
$msg = ApiMain::makeHelpMsgHeader($module, $type);
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false) {
$msg .= $msg2;
}
return $msg;
}