本文整理匯總了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;
}