本文整理汇总了PHP中ApiBase::makeHelpMsg方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiBase::makeHelpMsg方法的具体用法?PHP ApiBase::makeHelpMsg怎么用?PHP ApiBase::makeHelpMsg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApiBase
的用法示例。
在下文中一共展示了ApiBase::makeHelpMsg方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeHelpMsg
/**
* @return string
*/
public function makeHelpMsg()
{
$msg = parent::makeHelpMsg();
$querySeparator = str_repeat('--- ', 12);
$moduleSeparator = str_repeat('*** ', 14);
$msg .= "\n{$querySeparator} Analytics: Metrics {$querySeparator}\n\n";
global $wgMetricAPIModules;
$msg .= $this->makeHelpMsgHelper($wgMetricAPIModules, 'metric');
$msg .= "\n\n{$moduleSeparator} Modules: continuation {$moduleSeparator}\n\n";
return $msg;
}
示例2: makeHelpMsg
/**
* Override the parent to generate help messages for all available query modules.
* @return string
*/
public function makeHelpMsg()
{
// Use parent to make default message for the query module
$msg = parent::makeHelpMsg();
$querySeparator = str_repeat('--- ', 12);
$moduleSeparator = str_repeat('*** ', 14);
$msg .= "\n{$querySeparator} Query: Prop {$querySeparator}\n\n";
$msg .= $this->makeHelpMsgHelper('prop');
$msg .= "\n{$querySeparator} Query: List {$querySeparator}\n\n";
$msg .= $this->makeHelpMsgHelper('list');
$msg .= "\n{$querySeparator} Query: Meta {$querySeparator}\n\n";
$msg .= $this->makeHelpMsgHelper('meta');
$msg .= "\n\n{$moduleSeparator} Modules: continuation {$moduleSeparator}\n\n";
return $msg;
}
示例3: reallyMakeHelpMsg
/**
* @deprecated since 1.25
* @return mixed|string
*/
public function reallyMakeHelpMsg()
{
wfDeprecated(__METHOD__, '1.25');
$this->setHelp();
// Use parent to make default message for the main module
$msg = parent::makeHelpMsg();
$astriks = str_repeat('*** ', 14);
$msg .= "\n\n{$astriks} Modules {$astriks}\n\n";
foreach ($this->mModuleMgr->getNames('action') as $name) {
$module = $this->mModuleMgr->getModule($name);
$msg .= self::makeHelpMsgHeader($module, 'action');
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false) {
$msg .= $msg2;
}
$msg .= "\n";
}
$msg .= "\n{$astriks} Permissions {$astriks}\n\n";
foreach (self::$mRights as $right => $rightMsg) {
$rightsMsg = $this->msg($rightMsg['msg'], $rightMsg['params'])->useDatabase(false)->inLanguage('en')->text();
$groups = User::getGroupsWithPermission($right);
$msg .= "* " . $right . " *\n {$rightsMsg}" . "\nGranted to:\n " . str_replace('*', 'all', implode(', ', $groups)) . "\n\n";
}
$msg .= "\n{$astriks} Formats {$astriks}\n\n";
foreach ($this->mModuleMgr->getNames('format') as $name) {
$module = $this->mModuleMgr->getModule($name);
$msg .= self::makeHelpMsgHeader($module, 'format');
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false) {
$msg .= $msg2;
}
$msg .= "\n";
}
$credits = $this->msg('api-credits')->useDatabase('false')->inLanguage('en')->text();
$credits = str_replace("\n", "\n ", $credits);
$msg .= "\n*** Credits: ***\n {$credits}\n";
return $msg;
}
示例4: reallyMakeHelpMsg
/**
* @return mixed|string
*/
public function reallyMakeHelpMsg()
{
$this->setHelp();
// Use parent to make default message for the main module
$msg = parent::makeHelpMsg();
$astriks = str_repeat('*** ', 14);
$msg .= "\n\n{$astriks} Modules {$astriks}\n\n";
foreach (array_keys($this->mModules) as $moduleName) {
$module = new $this->mModules[$moduleName]($this, $moduleName);
$msg .= self::makeHelpMsgHeader($module, 'action');
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false) {
$msg .= $msg2;
}
$msg .= "\n";
}
$msg .= "\n{$astriks} Permissions {$astriks}\n\n";
foreach (self::$mRights as $right => $rightMsg) {
$groups = User::getGroupsWithPermission($right);
$msg .= "* " . $right . " *\n " . wfMsgReplaceArgs($rightMsg['msg'], $rightMsg['params']) . "\nGranted to:\n " . str_replace('*', 'all', implode(', ', $groups)) . "\n\n";
}
$msg .= "\n{$astriks} Formats {$astriks}\n\n";
foreach (array_keys($this->mFormats) as $formatName) {
$module = $this->createPrinterByName($formatName);
$msg .= self::makeHelpMsgHeader($module, 'format');
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false) {
$msg .= $msg2;
}
$msg .= "\n";
}
$msg .= "\n*** Credits: ***\n " . implode("\n ", $this->getCredits()) . "\n";
return $msg;
}
示例5: makeHelpMsg
/**
* Override the parent to generate help messages for all available query modules.
* @return string
*/
public function makeHelpMsg()
{
$msg = '';
// Make sure the internal object is empty
// (just in case a sub-module decides to optimize during instantiation)
$this->mPageSet = null;
$this->mAllowedGenerators = array();
// Will be repopulated
$querySeparator = str_repeat('--- ', 8);
$moduleSeparator = str_repeat('*** ', 10);
$msg .= "\n{$querySeparator} Query: Prop {$querySeparator}\n\n";
$msg .= $this->makeHelpMsgHelper($this->mQueryPropModules, 'prop');
$msg .= "\n{$querySeparator} Query: List {$querySeparator}\n\n";
$msg .= $this->makeHelpMsgHelper($this->mQueryListModules, 'list');
$msg .= "\n{$querySeparator} Query: Meta {$querySeparator}\n\n";
$msg .= $this->makeHelpMsgHelper($this->mQueryMetaModules, 'meta');
$msg .= "\n\n{$moduleSeparator} Modules: continuation {$moduleSeparator}\n\n";
// Perform the base call last because the $this->mAllowedGenerators
// will be updated inside makeHelpMsgHelper()
// Use parent to make default message for the query module
$msg = parent::makeHelpMsg() . $msg;
return $msg;
}
示例6: makeHelpMsg
/**
* Override the parent to generate help messages for all available modules.
*/
public function makeHelpMsg()
{
// Use parent to make default message for the main module
$msg = parent::makeHelpMsg();
$astriks = str_repeat('*** ', 10);
$msg .= "\n\n{$astriks} Modules {$astriks}\n\n";
foreach ($this->mModules as $moduleName => $unused) {
$module = new $this->mModules[$moduleName]($this, $moduleName);
$msg .= self::makeHelpMsgHeader($module, 'action');
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false) {
$msg .= $msg2;
}
$msg .= "\n";
}
$msg .= "\n{$astriks} Formats {$astriks}\n\n";
foreach ($this->mFormats as $formatName => $unused) {
$module = $this->createPrinterByName($formatName);
$msg .= self::makeHelpMsgHeader($module, 'format');
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false) {
$msg .= $msg2;
}
$msg .= "\n";
}
$msg .= "\n*** Credits: ***\n " . implode("\n ", $this->getCredits()) . "\n";
return $msg;
}
示例7: makeHelpMsg
/**
* Override the parent to generate help messages for all available query modules.
*/
public function makeHelpMsg()
{
// Use parent to make default message for the query module
$msg = parent::makeHelpMsg();
// Make sure the internal object is empty
// (just in case a sub-module decides to optimize during instantiation)
$this->mPageSet = null;
$astriks = str_repeat('--- ', 8);
$msg .= "\n{$astriks} Query: Prop {$astriks}\n\n";
$msg .= $this->makeHelpMsgHelper($this->mQueryPropModules, 'prop');
$msg .= "\n{$astriks} Query: List {$astriks}\n\n";
$msg .= $this->makeHelpMsgHelper($this->mQueryListModules, 'list');
$msg .= "\n{$astriks} Query: Meta {$astriks}\n\n";
$msg .= $this->makeHelpMsgHelper($this->mQueryMetaModules, 'meta');
return $msg;
}
示例8: makeHelpMsg
/**
* Override the parent to generate help messages for all available modules.
*/
public function makeHelpMsg()
{
// Use parent to make default message for the main module
$msg = parent::makeHelpMsg();
$astriks = str_repeat('*** ', 10);
$msg .= "\n\n{$astriks} Modules {$astriks}\n\n";
foreach ($this->mModules as $moduleName => $moduleClass) {
$msg .= "* action={$moduleName} *";
$module = new $this->mModules[$moduleName]($this, $moduleName);
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false) {
$msg .= $msg2;
}
$msg .= "\n";
}
$msg .= "\n{$astriks} Formats {$astriks}\n\n";
foreach ($this->mFormats as $moduleName => $moduleClass) {
$msg .= "* format={$moduleName} *";
$module = new $this->mFormats[$moduleName]($this, $moduleName);
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false) {
$msg .= $msg2;
}
$msg .= "\n";
}
return $msg;
}