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


PHP ApiBase::makeHelpMsg方法代码示例

本文整理汇总了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;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:14,代码来源:ApiAnalytics.php

示例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;
 }
开发者ID:Tarendai,项目名称:spring-website,代码行数:19,代码来源:ApiQuery.php

示例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;
 }
开发者ID:soumyag213,项目名称:mediawiki,代码行数:42,代码来源:ApiMain.php

示例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;
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:37,代码来源:ApiMain.php

示例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;
 }
开发者ID:GodelDesign,项目名称:Godel,代码行数:27,代码来源:ApiQuery.php

示例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;
 }
开发者ID:mediawiki-extensions,项目名称:bizzwiki,代码行数:31,代码来源:ApiMain.php

示例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;
 }
开发者ID:puring0815,项目名称:OpenKore,代码行数:19,代码来源:ApiQuery.php

示例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;
 }
开发者ID:puring0815,项目名称:OpenKore,代码行数:30,代码来源:ApiMain.php


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