/** * @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; }
/** * 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; }
/** * @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; }
/** * @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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }