MediaWiki
1.27.3
|
This abstract class implements many basic API functions, and is the base of all API classes. More...
Inherits ContextSource.
Inherited by ApiAMCreateAccount, ApiBlock, ApiChangeAuthenticationData, ApiCheckToken, ApiClearHasMsg, ApiClientLogin, ApiComparePages, ApiDelete, ApiDisabled, ApiEditPage, ApiEmailUser, ApiExpandTemplates, ApiFeedContributions, ApiFeedRecentChanges, ApiFeedWatchlist, ApiFileRevert, ApiFormatBase, ApiHelp, ApiImageRotate, ApiImport, ApiLinkAccount, ApiLogin, ApiLogout, ApiMain, ApiManageTags, ApiMergeHistory, ApiMove, ApiOpenSearch, ApiOptions, ApiPageSet, ApiParamInfo, ApiParse, ApiPatrol, ApiProtect, ApiPurge, ApiQuery, ApiQueryBase, ApiRemoveAuthenticationData, ApiResetPassword, ApiRevisionDelete, ApiRollback, ApiRsd, ApiSetNotificationTimestamp, ApiStashEdit, ApiTag, ApiTokens, ApiUnblock, ApiUndelete, ApiUpload, ApiUserrights, ApiWatch, and MockApi.
Public Member Functions | |
__construct (ApiMain $mainModule, $moduleName, $modulePrefix= '') | |
Public Member Functions inherited from ContextSource | |
canUseWikiPage () | |
Check whether a WikiPage object can be get with getWikiPage(). More... | |
exportSession () | |
Export the resolved user IP, HTTP headers, user ID, and session ID. More... | |
getConfig () | |
Get the Config object. More... | |
getContext () | |
Get the base IContextSource object. More... | |
getLanguage () | |
Get the Language object. More... | |
getOutput () | |
Get the OutputPage object. More... | |
getRequest () | |
Get the WebRequest object. More... | |
getSkin () | |
Get the Skin object. More... | |
getStats () | |
Get the Stats object. More... | |
getTiming () | |
Get the Timing object. More... | |
getTitle () | |
Get the Title object. More... | |
getUser () | |
Get the User object. More... | |
getWikiPage () | |
Get the WikiPage object. More... | |
msg () | |
Get a Message object with context set Parameters are the same as wfMessage() More... | |
setContext (IContextSource $context) | |
Set the IContextSource object. More... | |
Public Attributes | |
string | $mModulePrefix |
const | GET_VALUES_FOR_HELP = 1 |
getAllowedParams() flag: When set, the result could take longer to generate, but should be more thorough. More... | |
const | LIMIT_BIG1 = 500 |
Fast query, standard limit. More... | |
const | LIMIT_BIG2 = 5000 |
Fast query, apihighlimits limit. More... | |
const | LIMIT_SML1 = 50 |
Slow query, standard limit. More... | |
const | LIMIT_SML2 = 500 |
Slow query, apihighlimits limit. More... | |
Constants for ::getAllowedParams() arrays | |
These constants are keys in the arrays returned by ::getAllowedParams() and accepted by ::getParameterFromSettings() that define how the parameters coming in from the request are to be interpreted. | |
const | PARAM_DFLT = 0 |
(null|boolean|integer|string) Default value of the parameter. More... | |
const | PARAM_ISMULTI = 1 |
(boolean) Accept multiple pipe-separated values for this parameter (e.g. More... | |
const | PARAM_TYPE = 2 |
(string|string[]) Either an array of allowed value strings, or a string type as described below. More... | |
const | PARAM_MAX = 3 |
(integer) Max value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'. More... | |
const | PARAM_MAX2 = 4 |
(integer) Max value allowed for the parameter for users with the apihighlimits right, for PARAM_TYPE 'limit'. More... | |
const | PARAM_MIN = 5 |
(integer) Lowest value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'. More... | |
const | PARAM_ALLOW_DUPLICATES = 6 |
(boolean) Allow the same value to be set more than once when PARAM_ISMULTI is true? More... | |
const | PARAM_DEPRECATED = 7 |
(boolean) Is the parameter deprecated (will show a warning)? More... | |
const | PARAM_REQUIRED = 8 |
(boolean) Is the parameter required? More... | |
const | PARAM_RANGE_ENFORCE = 9 |
(boolean) For PARAM_TYPE 'integer', enforce PARAM_MIN and PARAM_MAX? More... | |
const | PARAM_HELP_MSG = 10 |
(string|array|Message) Specify an alternative i18n documentation message for this parameter. More... | |
const | PARAM_HELP_MSG_APPEND = 11 |
((string|array|Message)[]) Specify additional i18n messages to append to the normal message for this parameter. More... | |
const | PARAM_HELP_MSG_INFO = 12 |
(array) Specify additional information tags for the parameter. More... | |
const | PARAM_VALUE_LINKS = 13 |
(string[]) When PARAM_TYPE is an array, this may be an array mapping those values to page titles which will be linked in the help. More... | |
const | PARAM_HELP_MSG_PER_VALUE = 14 |
((string|array|Message)[]) When PARAM_TYPE is an array, this is an array mapping those values to $msg for ApiBase::makeMessage(). More... | |
const | PARAM_SUBMODULE_MAP = 15 |
(string[]) When PARAM_TYPE is 'submodule', map parameter values to submodule paths. More... | |
const | PARAM_SUBMODULE_PARAM_PREFIX = 16 |
(string) When PARAM_TYPE is 'submodule', used to indicate the 'g' prefix added by ApiQueryGeneratorBase (and similar if anything else ever does that). More... | |
const | PARAM_SENSITIVE = 17 |
(boolean) Is the parameter sensitive? Note 'password'-type fields are always sensitive regardless of the value of this field. More... | |
Private Attributes | |
ApiMain | $mMainModule |
string | $mModuleName |
array null bool | $mModuleSource = false |
$mParamCache = [] | |
$mSlaveDB = null | |
Static Private Attributes | |
static array | $extensionInfo = null |
Maps extension paths to info arrays. More... | |
Methods to implement | |
execute () | |
Evaluates the parameters, performs the requested query, and sets up the result. More... | |
getModuleManager () | |
Get the module manager, or null if this module has no sub-modules. More... | |
getCustomPrinter () | |
If the module may only be used with a certain format module, it should override this method to return an instance of that formatter. More... | |
getHelpUrls () | |
Return links to more detailed help pages about the module. More... | |
shouldCheckMaxlag () | |
Indicates if this module needs maxlag to be checked. More... | |
isReadMode () | |
Indicates whether this module requires read rights. More... | |
isWriteMode () | |
Indicates whether this module requires write mode. More... | |
mustBePosted () | |
Indicates whether this module must be called with a POST request. More... | |
isDeprecated () | |
Indicates whether this module is deprecated. More... | |
isInternal () | |
Indicates whether this module is "internal" Internal API modules are not (yet) intended for 3rd party use and may be unstable. More... | |
needsToken () | |
Returns the token type this module requires in order to execute. More... | |
getConditionalRequestData ($condition) | |
Returns data for HTTP conditional request mechanisms. More... | |
getExamplesMessages () | |
Returns usage examples for this module. More... | |
getAllowedParams () | |
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (array with PARAM_* constants as keys) Don't call this function directly: use getFinalParams() to allow hooks to modify parameters as needed. More... | |
getWebUITokenSalt (array $params) | |
Fetch the salt used in the Web UI corresponding to this module. More... | |
Data access methods | |
getModuleName () | |
Get the name of the module being executed by this instance. More... | |
getModulePrefix () | |
Get parameter prefix (usually two letters or an empty string). More... | |
getMain () | |
Get the main module. More... | |
isMain () | |
Returns true if this module is the main module ($this === $this->mMainModule), false otherwise. More... | |
getParent () | |
Get the parent of this module. More... | |
lacksSameOriginSecurity () | |
Returns true if the current request breaks the same-origin policy. More... | |
getModulePath () | |
Get the path to this module. More... | |
getModuleFromPath ($path) | |
Get a module from its module path. More... | |
getResult () | |
Get the result object. More... | |
getErrorFormatter () | |
Get the error formatter. More... | |
getContinuationManager () | |
Get the continuation manager. More... | |
setContinuationManager ($manager) | |
Set the continuation manager. More... | |
getDB () | |
Gets a default slave database connection object. More... | |
Parameter handling | |
dynamicParameterDocumentation () | |
Indicate if the module supports dynamically-determined parameters that cannot be included in self::getAllowedParams(). More... | |
encodeParamName ($paramName) | |
This method mangles parameter name based on the prefix supplied to the constructor. More... | |
extractRequestParams ($parseLimit=true) | |
Using getAllowedParams(), this function makes an array of the values provided by the user, with key being the name of the variable, and value - validated value from user or default. More... | |
requireOnlyOneParameter ($params, $required) | |
Die if none or more than one of a certain set of parameters is set and not false. More... | |
requireMaxOneParameter ($params, $required) | |
Die if more than one of a certain set of parameters is set and not false. More... | |
requireAtLeastOneParameter ($params, $required) | |
Die if none of a certain set of parameters is set and not false. More... | |
requirePostedParameters ($params, $prefix= 'prefix') | |
Die if any of the specified parameters were found in the query part of the URL rather than the post body. More... | |
getTitleOrPageId ($params, $load=false) | |
Get a WikiPage object from a title or pageid param, if possible. More... | |
validateToken ($token, array $params) | |
Validate the supplied token. More... | |
getParameter ($paramName, $parseLimit=true) | |
Get a value for the given parameter. More... | |
getWatchlistValue ($watchlist, $titleObj, $userOption=null) | |
Return true if we're to watch the page, false if not, null if no change. More... | |
getParameterFromSettings ($paramName, $paramSettings, $parseLimit) | |
Using the settings determine the value for the given parameter. More... | |
parseMultiValue ($valueName, $value, $allowMultiple, $allowedValues) | |
Return an array of values that were given in a 'a|b|c' notation, after it optionally validates them against the list allowed values. More... | |
validateLimit ($paramName, &$value, $min, $max, $botMax=null, $enforceLimits=false) | |
Validate the value against the minimum and user/bot maximum limits. More... | |
validateTimestamp ($value, $encParamName) | |
Validate and normalize of parameters of type 'timestamp'. More... | |
parameterNotEmpty ($x) | |
Callback function used in requireOnlyOneParameter to check whether required parameters are set. More... | |
validateUser ($value, $encParamName) | |
Validate and normalize of parameters of type 'user'. More... | |
Utility methods | |
getWatchlistUser ($params) | |
Gets the user for whom to get the watchlist. More... | |
setWatch ($watch, $titleObj, $userOption=null) | |
Set a watch (or unwatch) based the based on a watchlist parameter. More... | |
static | truncateArray (&$arr, $limit) |
Truncate an array to a certain length. More... | |
static | makeMessage ($msg, IContextSource $context, array $params=null) |
Create a Message from a string or array. More... | |
static | escapeWikiText ($v) |
A subset of wfEscapeWikiText for BC texts. More... | |
Warning and error reporting | |
static | $messageMap |
Array that maps message keys to error messages. More... | |
setWarning ($warning) | |
Set warning section for this module. More... | |
dieUsage ($description, $errorCode, $httpRespCode=0, $extradata=null) | |
Throw a UsageException, which will (if uncaught) call the main module's error handler and die with an error message. More... | |
dieBlocked (Block $block) | |
Throw a UsageException, which will (if uncaught) call the main module's error handler and die with an error message including block info. More... | |
getErrorFromStatus ($status, &$extraData=null) | |
Get error (as code, string) from a Status object. More... | |
dieStatus ($status) | |
Throw a UsageException based on the errors in the Status object. More... | |
static | dieReadOnly () |
Helper function for readonly errors. More... | |
dieUsageMsg ($error) | |
Output the error message related to a certain array. More... | |
dieUsageMsgOrDebug ($error) | |
Will only set a warning instead of failing if the global $wgDebugAPI is set to true. More... | |
parseMsg ($error) | |
Return the error message related to a certain array. More... | |
logFeatureUsage ($feature) | |
Write logging information for API features to a debug log, for usage analysis. More... | |
dieContinueUsageIf ($condition) | |
Die with the $prefix. More... | |
warnOrDie ($msg, $enforceLimits=false) | |
Adds a warning to the output, else dies. More... | |
static | dieDebug ($method, $message) |
Internal code errors should be reported with this method. More... | |
Help message generation | |
getFinalDescription () | |
Get final module description, after hooks have had a chance to tweak it as needed. More... | |
getFinalParams ($flags=0) | |
Get final list of parameters, after hooks have had a chance to tweak it as needed. More... | |
getFinalParamDescription () | |
Get final parameter descriptions, after hooks have had a chance to tweak it as needed. More... | |
modifyHelp (array &$help, array $options, array &$tocData) | |
Called from ApiHelp before the pieces are joined together and returned. More... | |
getDescriptionMessage () | |
Return the description message. More... | |
getHelpFlags () | |
Generates the list of flags for the help screen and for action=paraminfo. More... | |
getModuleSourceInfo () | |
Returns information about the source of this module, if known. More... | |
Deprecated | |
makeHelpMsg () | |
Generates help message for this module, or false if there is no description. More... | |
makeHelpMsgParameters () | |
Generates the parameter descriptions for this module, to be displayed in the module's help. More... | |
getModuleProfileName ($db=false) | |
profileIn () | |
profileOut () | |
safeProfileOut () | |
getProfileTime () | |
profileDBIn () | |
profileDBOut () | |
getProfileDBTime () | |
getResultData () | |
Get the result data array (read-only) More... | |
getDescription () | |
Returns the description string for this module. More... | |
getParamDescription () | |
Returns an array of parameter descriptions. More... | |
getExamples () | |
Returns usage examples for this module. More... | |
makeHelpArrayToString ($prefix, $title, $input) | |
useTransactionalTimeLimit () | |
Call wfTransactionalTimeLimit() if this request was POSTed. More... | |
indentExampleText ($item) | |
This abstract class implements many basic API functions, and is the base of all API classes.
The class functions are divided into several areas of functionality:
Module parameters: Derived classes can define getAllowedParams() to specify which parameters to expect, how to parse and validate them.
Self-documentation: code to allow the API to document its own state
Definition at line 39 of file ApiBase.php.
ApiBase::__construct | ( | ApiMain | $mainModule, |
$moduleName, | |||
$modulePrefix = '' |
|||
) |
ApiMain | $mainModule | |
string | $moduleName | Name of this module |
string | $modulePrefix | Prefix to use for parameter names |
Definition at line 216 of file ApiBase.php.
References ContextSource\getContext(), isMain(), and ContextSource\setContext().
ApiBase::dieBlocked | ( | Block | $block | ) |
Throw a UsageException, which will (if uncaught) call the main module's error handler and die with an error message including block info.
Block | $block | The block used to generate the UsageException |
UsageException | always |
Definition at line 1543 of file ApiBase.php.
References dieUsage(), ApiQueryUserInfo\getBlockInfo(), Block\getType(), and Block\TYPE_AUTO.
Referenced by ApiUpload\checkPermissions(), ApiTag\execute(), ApiUndelete\execute(), ApiRevisionDelete\execute(), and ApiUserrights\execute().
|
protected |
Die with the $prefix.
'badcontinue' error. This call is common enough to make it into the base method.
bool | $condition | Will only die if this value is true |
UsageException |
Definition at line 2181 of file ApiBase.php.
References dieUsage().
Referenced by ApiQueryMyStashedFiles\execute(), ApiQueryLangLinks\execute(), ApiQueryBlocks\execute(), ApiQueryIWLinks\execute(), ApiQueryDeletedrevs\execute(), ApiQueryPageProps\execute(), ApiQueryFilearchive\execute(), ApiQueryLogEvents\execute(), ApiQueryPagePropNames\execute(), ApiQueryImageInfo\execute(), ApiQueryContributors\execute(), ApiQueryInfo\execute(), ApiQueryContributions\prepareQuery(), ApiQueryDeletedRevisions\run(), ApiQueryAllRevisions\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryImages\run(), ApiQueryIWBacklinks\run(), ApiQueryLangBacklinks\run(), ApiQueryProtectedTitles\run(), ApiQueryWatchlistRaw\run(), ApiQueryCategories\run(), ApiQueryDuplicateFiles\run(), ApiQueryAllCategories\run(), ApiQueryPagesWithProp\run(), ApiQueryWatchlist\run(), ApiQueryCategoryMembers\run(), ApiQueryAllPages\run(), ApiQueryLinks\run(), ApiQueryAllImages\run(), ApiQueryRevisions\run(), ApiQueryBacklinksprop\run(), ApiQueryAllLinks\run(), ApiQueryRandom\run(), and ApiQueryRecentChanges\run().
|
staticprotected |
Internal code errors should be reported with this method.
string | $method | Method or function name |
string | $message | Error message |
MWException | always |
Definition at line 2230 of file ApiBase.php.
Referenced by ApiQueryLinks\__construct(), ApiQueryAllLinks\__construct(), ApiQueryBase\addJoinConds(), ApiQueryBase\addTables(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\execute(), ApiQueryAllUsers\execute(), ApiLogin\execute(), ApiFormatRaw\execute(), ApiFormatFeedWrapper\execute(), getContinuationManager(), ApiOpenSearch\getCustomPrinter(), getErrorFormatter(), ApiFormatRaw\getMimeType(), getParameterFromSettings(), getResult(), ApiPageSet\initFromQueryResult(), ApiFormatFeedWrapper\initPrinter(), ApiQuery\instantiateModules(), lacksSameOriginSecurity(), ApiOpenSearch\populateResult(), ApiQueryDeletedRevisions\run(), ApiQueryWatchlist\run(), ApiQueryRevisions\run(), ApiQueryRecentChanges\run(), setContinuationManager(), and ApiQueryGeneratorBase\setGeneratorMode().
static ApiBase::dieReadOnly | ( | ) |
Helper function for readonly errors.
UsageException | always |
Definition at line 2133 of file ApiBase.php.
References dieUsage(), parseMsg(), and wfReadOnlyReason().
Referenced by ApiMain\checkReadOnly(), and ApiEditPage\execute().
ApiBase::dieStatus | ( | $status | ) |
Throw a UsageException based on the errors in the Status object.
Status | $status |
UsageException | always |
Definition at line 1615 of file ApiBase.php.
References $code, $status, dieUsage(), getErrorFromStatus(), and list.
Referenced by ApiManageTags\execute(), ApiProtect\execute(), ApiUndelete\execute(), ApiMove\execute(), ApiMergeHistory\execute(), ApiImport\execute(), ApiChangeAuthenticationData\execute(), ApiPatrol\execute(), ApiEditPage\execute(), ApiUnblock\execute(), ApiDelete\execute(), ApiRollback\execute(), ApiRemoveAuthenticationData\execute(), ApiResetPassword\execute(), getParameterFromSettings(), ApiUserrights\getUrUser(), ApiUpload\performUpload(), and ApiWatch\watchTitle().
ApiBase::dieUsage | ( | $description, | |
$errorCode, | |||
$httpRespCode = 0 , |
|||
$extradata = null |
|||
) |
Throw a UsageException, which will (if uncaught) call the main module's error handler and die with an error message.
string | $description | One-line human-readable description of the error condition, e.g., "The API requires a valid action parameter" |
string | $errorCode | Brief, arbitrary, stable string to allow easy automated identification of the error, e.g., 'unknown_action' |
int | $httpRespCode | HTTP response code |
array | null | $extradata | Data to add to the "<error>" element; array in ApiResult format |
UsageException | always |
Definition at line 1526 of file ApiBase.php.
References encodeParamName().
Referenced by ApiQuerySiteinfo\appendDbReplLagInfo(), ApiMain\checkAsserts(), ApiMain\checkBotReadOnly(), ApiMain\checkExecutePermissions(), ApiMain\checkMaxLag(), ApiQueryImageInfo\checkParameterNormalise(), ApiParse\checkReadPermissions(), ApiUpload\checkVerification(), ApiMain\createPrinterByName(), dieBlocked(), dieContinueUsageIf(), dieReadOnly(), ApiUpload\dieRecoverableError(), dieStatus(), dieUsageMsg(), ApiComparePages\execute(), ApiManageTags\execute(), ApiTag\execute(), ApiQueryStashImageInfo\execute(), ApiRevisionDelete\execute(), ApiQueryMyStashedFiles\execute(), ApiWatch\execute(), ApiSetNotificationTimestamp\execute(), ApiUpload\execute(), ApiChangeAuthenticationData\execute(), ApiExpandTemplates\execute(), ApiPatrol\execute(), ApiLogout\execute(), ApiOptions\execute(), ApiEditPage\execute(), ApiFormatPhp\execute(), ApiUnblock\execute(), ApiQueryAllMessages\execute(), ApiQueryBlocks\execute(), ApiQueryDeletedrevs\execute(), ApiDisabled\execute(), ApiQueryFilearchive\execute(), ApiBlock\execute(), ApiFeedContributions\execute(), ApiQueryLogEvents\execute(), ApiQueryContributions\execute(), ApiFeedRecentChanges\execute(), ApiStashEdit\execute(), ApiParse\execute(), ApiRemoveAuthenticationData\execute(), ApiQueryAllUsers\execute(), ApiLinkAccount\execute(), ApiAMCreateAccount\execute(), ApiClientLogin\execute(), ApiFeedWatchlist\execute(), ApiResetPassword\execute(), ApiFormatJson\execute(), ApiOpenSearchFormatJson\execute(), ApiQueryAllPages\executeGenerator(), ApiQueryAllImages\executeGenerator(), ApiPageSet\executeInternal(), ApiQueryRevisionsBase\extractRevisionInfo(), ApiUpload\getChunkResult(), getModuleFromPath(), getParameterFromSettings(), ApiParse\getParsedContent(), ApiParse\getSectionContent(), ApiUpload\getStashResult(), getTitleOrPageId(), getWatchlistUser(), ApiUpload\handleStashException(), ApiQueryImageInfo\mergeThumbParams(), ApiQuery\outputGeneralPageInfo(), parseMultiValue(), ApiQueryRevisionsBase\parseParameters(), ApiUpload\performUpload(), ApiQueryContributions\prepareQuery(), ApiQueryBase\prepareUrlQuerySearchString(), ApiQueryContributions\prepareUsername(), ApiQueryBlocks\prepareUsername(), requireAtLeastOneParameter(), requireMaxOneParameter(), requireOnlyOneParameter(), requirePostedParameters(), ApiComparePages\revisionOrTitleOrId(), ApiQueryDeletedRevisions\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryWatchlist\run(), ApiQuerySearch\run(), ApiQueryCategoryMembers\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryRevisions\run(), ApiQueryAllLinks\run(), ApiQueryRecentChanges\run(), ApiUpload\selectUploadModule(), ApiMain\setupExecuteAction(), ApiMain\setupModule(), validateTimestamp(), validateUser(), and warnOrDie().
ApiBase::dieUsageMsg | ( | $error | ) |
Output the error message related to a certain array.
array | string | $error | Element of a getUserPermissionsErrors()-style array |
UsageException | always |
Definition at line 2144 of file ApiBase.php.
References dieUsage(), and parseMsg().
Referenced by ApiMain\checkExecutePermissions(), ApiFileRevert\checkPermissions(), ApiUpload\checkPermissions(), dieUsageMsgOrDebug(), ApiProtect\execute(), ApiUndelete\execute(), ApiMergeHistory\execute(), ApiMove\execute(), ApiEmailUser\execute(), ApiRevisionDelete\execute(), ApiImport\execute(), ApiWatch\execute(), ApiExpandTemplates\execute(), ApiPatrol\execute(), ApiUpload\execute(), ApiOptions\execute(), ApiEditPage\execute(), ApiUnblock\execute(), ApiQueryAllMessages\execute(), ApiQueryBlocks\execute(), ApiQueryLangLinks\execute(), ApiQueryIWLinks\execute(), ApiBlock\execute(), ApiDelete\execute(), ApiRollback\execute(), ApiParse\execute(), ApiUpload\getContextResult(), ApiFeedRecentChanges\getFeedObject(), getParameterFromSettings(), ApiRollback\getRbTitle(), ApiRollback\getRbUser(), getTitleOrPageId(), ApiQueryRevisionsBase\parseParameters(), ApiQueryBase\prefixedTitlePartToKey(), ApiQueryContributions\prepareQuery(), ApiComparePages\revisionOrTitleOrId(), ApiQueryLangBacklinks\run(), ApiQueryIWBacklinks\run(), ApiQueryWatchlistRaw\run(), ApiQueryCategories\run(), ApiQueryWatchlist\run(), ApiQueryQueryPage\run(), ApiQueryBacklinksprop\run(), ApiQueryRecentChanges\run(), ApiUpload\selectUploadModule(), ApiMain\setupModule(), ApiQueryBase\titlePartToKey(), and ApiFileRevert\validateParameters().
ApiBase::dieUsageMsgOrDebug | ( | $error | ) |
Will only set a warning instead of failing if the global $wgDebugAPI is set to true.
Otherwise behaves exactly as dieUsageMsg().
array | string | $error | Element of a getUserPermissionsErrors()-style array |
UsageException |
Definition at line 2162 of file ApiBase.php.
References dieUsageMsg(), ContextSource\getConfig(), parseMsg(), and setWarning().
Referenced by ApiQuery\instantiateModules(), and ApiMain\setupExternalResponse().
ApiBase::dynamicParameterDocumentation | ( | ) |
Indicate if the module supports dynamically-determined parameters that cannot be included in self::getAllowedParams().
Definition at line 662 of file ApiBase.php.
ApiBase::encodeParamName | ( | $paramName | ) |
This method mangles parameter name based on the prefix supplied to the constructor.
Override this method to change parameter name during runtime
string | $paramName | Parameter name |
Definition at line 672 of file ApiBase.php.
Referenced by ApiContinuationManager\addContinueParam(), ApiContinuationManager\addGeneratorContinueParam(), dieUsage(), ApiQueryLogEvents\execute(), ApiAMCreateAccount\execute(), ApiLinkAccount\execute(), ApiClientLogin\execute(), getParameterFromSettings(), makeHelpMsgParameters(), requirePostedParameters(), and validateLimit().
|
staticprivate |
A subset of wfEscapeWikiText for BC texts.
string | array | $v |
Definition at line 1439 of file ApiBase.php.
|
abstract |
Evaluates the parameters, performs the requested query, and sets up the result.
Concrete implementations of ApiBase must override this method to provide whatever functionality their module offers. Implementations must not produce any output on their own and are not expected to handle any errors.
The execute() method will be invoked directly by ApiMain immediately before the result of the module is output. Aside from the constructor, implementations should assume that no other methods will be called externally on the module before the result is processed.
The result data should be stored in the ApiResult object available through getResult().
ApiBase::extractRequestParams | ( | $parseLimit = true | ) |
Using getAllowedParams(), this function makes an array of the values provided by the user, with key being the name of the variable, and value - validated value from user or default.
limits will not be parsed if $parseLimit is set to false; use this when the max limit is not definitive yet, e.g. when getting revisions.
bool | $parseLimit | True by default |
Definition at line 685 of file ApiBase.php.
References $params, as, getFinalParams(), and getParameterFromSettings().
Referenced by ApiAuthManagerHelper\__construct(), ApiPageSet\__construct(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendLanguages(), ApiComparePages\execute(), ApiManageTags\execute(), ApiTag\execute(), ApiCheckToken\execute(), ApiProtect\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiTokens\execute(), ApiMergeHistory\execute(), ApiMove\execute(), ApiImport\execute(), ApiQueryStashImageInfo\execute(), ApiRevisionDelete\execute(), ApiQueryMyStashedFiles\execute(), ApiWatch\execute(), ApiPatrol\execute(), ApiHelp\execute(), ApiExpandTemplates\execute(), ApiQueryTokens\execute(), ApiSetNotificationTimestamp\execute(), ApiUpload\execute(), ApiFormatPhp\execute(), ApiEditPage\execute(), ApiQueryAuthManagerInfo\execute(), ApiOptions\execute(), ApiQueryLangLinks\execute(), ApiQuerySiteinfo\execute(), ApiQueryTags\execute(), ApiQueryAllMessages\execute(), ApiQueryBlocks\execute(), ApiUnblock\execute(), ApiQueryExternalLinks\execute(), ApiParamInfo\execute(), ApiQueryIWLinks\execute(), ApiPurge\execute(), ApiQueryCategoryInfo\execute(), ApiQueryDeletedrevs\execute(), ApiQueryPageProps\execute(), ApiFileRevert\execute(), ApiQueryFilearchive\execute(), ApiFeedContributions\execute(), ApiBlock\execute(), ApiDelete\execute(), ApiRollback\execute(), ApiQueryLogEvents\execute(), ApiQueryPagePropNames\execute(), ApiQueryUserInfo\execute(), ApiQueryContributions\execute(), ApiQueryFileRepoInfo\execute(), ApiFeedRecentChanges\execute(), ApiStashEdit\execute(), ApiParse\execute(), ApiRemoveAuthenticationData\execute(), ApiFormatXml\execute(), ApiQueryImageInfo\execute(), ApiQueryAllUsers\execute(), ApiQueryContributors\execute(), ApiAMCreateAccount\execute(), ApiImageRotate\execute(), ApiUserrights\execute(), ApiLinkAccount\execute(), ApiFeedWatchlist\execute(), ApiClientLogin\execute(), ApiResetPassword\execute(), ApiLogin\execute(), ApiFormatJson\execute(), ApiOpenSearch\execute(), ApiQueryUsers\execute(), ApiQuery\execute(), ApiQueryInfo\execute(), ApiHelp\getCustomPrinter(), ApiOpenSearch\getFormat(), ApiFormatJson\getMimeType(), ApiQuery\isReadMode(), ApiQueryDeletedRevisions\run(), ApiQueryAllRevisions\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryPrefixSearch\run(), ApiQueryLangBacklinks\run(), ApiQueryImages\run(), ApiQueryProtectedTitles\run(), ApiQueryIWBacklinks\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryDuplicateFiles\run(), ApiQueryCategories\run(), ApiQueryAllCategories\run(), ApiQueryPagesWithProp\run(), ApiQueryWatchlist\run(), ApiQueryQueryPage\run(), ApiQuerySearch\run(), ApiQueryCategoryMembers\run(), ApiQueryAllPages\run(), ApiQueryLinks\run(), ApiQueryAllImages\run(), ApiQueryRevisions\run(), ApiQueryBacklinksprop\run(), ApiQueryAllLinks\run(), ApiQueryRandom\run(), ApiQueryRecentChanges\run(), ApiQueryRandom\runQuery(), and ApiMain\setupExecuteAction().
|
protected |
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (array with PARAM_* constants as keys) Don't call this function directly: use getFinalParams() to allow hooks to modify parameters as needed.
Some derived classes may choose to handle an integer $flags parameter in the overriding methods. Callers of this method can pass zero or more OR-ed flags like GET_VALUES_FOR_HELP.
Definition at line 345 of file ApiBase.php.
Referenced by getFinalParams().
ApiBase::getConditionalRequestData | ( | $condition | ) |
Returns data for HTTP conditional request mechanisms.
string | $condition | Condition being queried:
|
Definition at line 449 of file ApiBase.php.
ApiBase::getContinuationManager | ( | ) |
Get the continuation manager.
Definition at line 624 of file ApiBase.php.
References dieDebug(), getMain(), and isMain().
Referenced by ApiQueryGeneratorBase\setContinueEnumParameter(), and ApiQueryBase\setContinueEnumParameter().
ApiBase::getCustomPrinter | ( | ) |
If the module may only be used with a certain format module, it should override this method to return an instance of that formatter.
A value of null means the default format will be used.
Definition at line 267 of file ApiBase.php.
|
protected |
Gets a default slave database connection object.
Definition at line 612 of file ApiBase.php.
References $mSlaveDB, DB_SLAVE, and wfGetDB().
Referenced by ApiQuery\doExport(), ApiParse\formatCategoryLinks(), and ApiOpenSearch\search().
|
protected |
Returns the description string for this module.
Ignored if an i18n message exists for "apihelp-{$this->getModulePath()}-description".
Definition at line 2588 of file ApiBase.php.
Referenced by getFinalDescription().
|
protected |
Return the description message.
Definition at line 2261 of file ApiBase.php.
Referenced by getFinalDescription().
ApiBase::getErrorFormatter | ( | ) |
Get the error formatter.
Definition at line 598 of file ApiBase.php.
References dieDebug(), getMain(), and isMain().
Referenced by ApiManageTags\execute(), ApiFileRevert\execute(), ApiImageRotate\execute(), ApiQueryUsers\execute(), ApiTag\processIndividual(), and setWarning().
ApiBase::getErrorFromStatus | ( | $status, | |
& | $extraData = null |
||
) |
Get error (as code, string) from a Status object.
Status | $status | |
array | null | &$extraData | Set if extra data from IApiMessage is available (since 1.27) |
MWException |
Definition at line 1571 of file ApiBase.php.
References $code, $messageMap, $status, and wfMessage().
Referenced by dieStatus(), ApiMove\execute(), and ApiWatch\watchTitle().
|
protected |
Returns usage examples for this module.
Return value as an array is either:
Definition at line 2624 of file ApiBase.php.
Referenced by getExamplesMessages(), and makeHelpMsg().
|
protected |
Returns usage examples for this module.
Return value has query strings as keys, with values being either strings (message key), arrays (message key + parameter), or Message objects.
Do not call this base class implementation when overriding this method.
Definition at line 282 of file ApiBase.php.
References $ret, as, getExamples(), and ContextSource\msg().
ApiBase::getFinalDescription | ( | ) |
Get final module description, after hooks have had a chance to tweak it as needed.
Definition at line 2272 of file ApiBase.php.
References ContextSource\getContext(), getDescription(), getDescriptionMessage(), getModuleName(), getModulePath(), getModulePrefix(), makeMessage(), ContextSource\msg(), Hooks\run(), and string.
Referenced by makeHelpMsg().
ApiBase::getFinalParamDescription | ( | ) |
Get final parameter descriptions, after hooks have had a chance to tweak it as needed.
Definition at line 2335 of file ApiBase.php.
References $line, $name, $params, $path, $value, as, GET_VALUES_FOR_HELP, ContextSource\getContext(), getFinalParams(), getModuleName(), getModulePath(), getModulePrefix(), getParamDescription(), makeMessage(), ContextSource\msg(), PARAM_HELP_MSG, PARAM_HELP_MSG_APPEND, PARAM_HELP_MSG_PER_VALUE, PARAM_TYPE, Hooks\run(), and Message\setContext().
Referenced by makeHelpMsgParameters().
ApiBase::getFinalParams | ( | $flags = 0 | ) |
Get final list of parameters, after hooks have had a chance to tweak it as needed.
int | $flags | Zero or more flags like GET_VALUES_FOR_HELP |
Definition at line 2305 of file ApiBase.php.
References $flags, $params, getAllowedParams(), needsToken(), PARAM_HELP_MSG, PARAM_REQUIRED, PARAM_SENSITIVE, PARAM_TYPE, and Hooks\run().
Referenced by extractRequestParams(), getFinalParamDescription(), getParameter(), and makeHelpMsgParameters().
|
protected |
Generates the list of flags for the help screen and for action=paraminfo.
Corresponding messages: api-help-flag-deprecated, api-help-flag-internal, api-help-flag-readrights, api-help-flag-writerights, api-help-flag-mustbeposted
Definition at line 2449 of file ApiBase.php.
References $flags, isDeprecated(), isInternal(), isReadMode(), isWriteMode(), and mustBePosted().
ApiBase::getHelpUrls | ( | ) |
Return links to more detailed help pages about the module.
Definition at line 329 of file ApiBase.php.
Referenced by makeHelpMsg().
ApiBase::getMain | ( | ) |
Get the main module.
Definition at line 480 of file ApiBase.php.
References $mMainModule.
Referenced by ApiFormatJson\__construct(), ApiFormatBase\__construct(), ApiQueryBase\__construct(), ApiPageSet\__construct(), ApiFormatBase\closePrinter(), ApiExpandTemplates\execute(), ApiUpload\execute(), ApiHelp\execute(), ApiEditPage\execute(), ApiParamInfo\execute(), ApiQueryDeletedrevs\execute(), ApiFeedRecentChanges\execute(), ApiParse\execute(), ApiFeedWatchlist\execute(), ApiOpenSearch\execute(), ApiQuery\execute(), ApiPageSet\executeInternal(), ApiQueryInfo\extractPageInfo(), ApiParamInfo\getAllowedParams(), ApiUpload\getChunkResult(), getContinuationManager(), ApiQueryUserInfo\getCurrentUserInfo(), ApiFeedRecentChanges\getCustomPrinter(), ApiFeedContributions\getCustomPrinter(), ApiFeedWatchlist\getCustomPrinter(), ApiRsd\getCustomPrinter(), ApiOpenSearch\getCustomPrinter(), ApiQuery\getCustomPrinter(), ApiHelp\getCustomPrinter(), getErrorFormatter(), ApiPageSet\getGenerators(), getModuleFromPath(), ApiParamInfo\getModuleInfo(), getParameterFromSettings(), getParent(), getResult(), ApiFeedWatchlist\getWatchlistModule(), ApiFormatRaw\initPrinter(), ApiFormatBase\initPrinter(), lacksSameOriginSecurity(), logFeatureUsage(), ApiQueryRevisionsBase\parseParameters(), requirePostedParameters(), ApiQueryRandom\run(), ApiUpload\selectUploadModule(), setContinuationManager(), and validateLimit().
ApiBase::getModuleFromPath | ( | $path | ) |
Get a module from its module path.
string | $path |
UsageException |
Definition at line 546 of file ApiBase.php.
References $count, $path, dieUsage(), and getMain().
Referenced by ApiHelp\execute(), ApiParamInfo\execute(), and ApiDocumentationTest\testDocumentationExists().
ApiBase::getModuleManager | ( | ) |
Get the module manager, or null if this module has no sub-modules.
Definition at line 254 of file ApiBase.php.
Referenced by ApiParamInfo\execute(), getParameterFromSettings(), and makeHelpMsgParameters().
ApiBase::getModuleName | ( | ) |
Get the name of the module being executed by this instance.
Definition at line 464 of file ApiBase.php.
References $mModuleName.
Referenced by ApiPageSet\__construct(), ApiContinuationManager\addContinueParam(), ApiContinuationManager\addGeneratorContinueParam(), ApiQueryBase\addPageSubItem(), ApiQueryBase\addPageSubItems(), ApiTag\execute(), ApiComparePages\execute(), ApiManageTags\execute(), ApiProtect\execute(), ApiCheckToken\execute(), ApiClearHasMsg\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiTokens\execute(), ApiMergeHistory\execute(), ApiMove\execute(), ApiQueryStashImageInfo\execute(), ApiRevisionDelete\execute(), ApiImport\execute(), ApiWatch\execute(), ApiQueryMyStashedFiles\execute(), ApiPatrol\execute(), ApiExpandTemplates\execute(), ApiQueryTokens\execute(), ApiHelp\execute(), ApiSetNotificationTimestamp\execute(), ApiUpload\execute(), ApiQueryAuthManagerInfo\execute(), ApiEditPage\execute(), ApiOptions\execute(), ApiQueryTags\execute(), ApiQueryAllMessages\execute(), ApiUnblock\execute(), ApiQueryBlocks\execute(), ApiPurge\execute(), ApiQueryDeletedrevs\execute(), ApiParamInfo\execute(), ApiFileRevert\execute(), ApiQueryFilearchive\execute(), ApiBlock\execute(), ApiDelete\execute(), ApiRollback\execute(), ApiQueryContributions\execute(), ApiQueryUserInfo\execute(), ApiQueryLogEvents\execute(), ApiQueryPagePropNames\execute(), ApiParse\execute(), ApiStashEdit\execute(), ApiRemoveAuthenticationData\execute(), ApiQueryAllUsers\execute(), ApiUserrights\execute(), ApiImageRotate\execute(), ApiQueryUsers\execute(), ApiMain\execute(), ApiQueryBacklinksprop\getAllowedParams(), ApiRemoveAuthenticationData\getExamplesMessages(), ApiQueryLinks\getExamplesMessages(), ApiQueryAllLinks\getExamplesMessages(), ApiFormatBase\getExamplesMessages(), ApiQueryBacklinksprop\getExamplesMessages(), ApiLinkAccount\getFinalDescription(), ApiAMCreateAccount\getFinalDescription(), ApiClientLogin\getFinalDescription(), getFinalDescription(), getFinalParamDescription(), ApiQueryAllLinks\getHelpUrls(), ApiQueryBacklinksprop\getHelpUrls(), getModulePath(), getParameterFromSettings(), ApiMain\makeHelpMsg(), ApiQueryRevisionsBase\parseParameters(), ApiQueryAllRevisions\run(), ApiQueryPrefixSearch\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryProtectedTitles\run(), ApiQueryIWBacklinks\run(), ApiQueryLangBacklinks\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryAllCategories\run(), ApiQueryPagesWithProp\run(), ApiQueryWatchlist\run(), ApiQueryQueryPage\run(), ApiQuerySearch\run(), ApiQueryCategoryMembers\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryBacklinksprop\run(), ApiQueryAllLinks\run(), ApiQueryRandom\run(), ApiQueryRecentChanges\run(), ApiQueryRandom\runQuery(), ApiUpload\selectUploadModule(), and setWarning().
ApiBase::getModulePath | ( | ) |
Get the path to this module.
Definition at line 528 of file ApiBase.php.
References getModuleName(), getParent(), and isMain().
Referenced by ApiRemoveAuthenticationData\getExamplesMessages(), ApiQueryLinks\getExamplesMessages(), ApiQueryAllLinks\getExamplesMessages(), ApiQueryBacklinksprop\getExamplesMessages(), ApiAMCreateAccount\getFinalDescription(), ApiLinkAccount\getFinalDescription(), ApiClientLogin\getFinalDescription(), getFinalDescription(), getFinalParamDescription(), ApiHelp\getHelp(), and ApiDocumentationTest\provideDocumentationExists().
ApiBase::getModulePrefix | ( | ) |
Get parameter prefix (usually two letters or an empty string).
Definition at line 472 of file ApiBase.php.
References $mModulePrefix.
Referenced by ApiQueryBase\addPageSubItem(), ApiQueryBase\addPageSubItems(), ApiQueryStashImageInfo\execute(), ApiWatch\execute(), ApiQueryDeletedrevs\execute(), ApiQueryUserInfo\getCurrentUserInfo(), ApiQueryAllLinks\getExamplesMessages(), ApiAMCreateAccount\getFinalDescription(), ApiLinkAccount\getFinalDescription(), ApiClientLogin\getFinalDescription(), getFinalDescription(), getFinalParamDescription(), ApiQueryImageInfo\mergeThumbParams(), ApiQueryRevisionsBase\parseParameters(), requireAtLeastOneParameter(), requireMaxOneParameter(), requireOnlyOneParameter(), ApiQueryAllDeletedRevisions\run(), ApiQueryPrefixSearch\run(), ApiQueryProtectedTitles\run(), ApiQueryExtLinksUsage\run(), ApiQueryAllImages\run(), and ApiQueryAllLinks\run().
ApiBase::getModuleProfileName | ( | $db = false | ) |
IDatabase | bool | $db |
Definition at line 2902 of file ApiBase.php.
References wfDeprecated().
|
protected |
Returns information about the source of this module, if known.
Returned array is an array with the following keys:
Definition at line 2482 of file ApiBase.php.
References $ext, $IP, $mModuleSource, $path, as, ContextSource\getConfig(), ExtensionRegistry\getInstance(), and global.
|
protected |
Returns an array of parameter descriptions.
For each parameter, ignored if an i18n message exists for the parameter. By default that message is "apihelp-{$this->getModulePath()}-param-{$param}", but it may be overridden using ApiBase::PARAM_HELP_MSG in the data returned by self::getFinalParams().
Definition at line 2604 of file ApiBase.php.
Referenced by getFinalParamDescription().
|
protected |
Get a value for the given parameter.
string | $paramName | Parameter name |
bool | $parseLimit | See extractRequestParams() |
Definition at line 709 of file ApiBase.php.
References getFinalParams(), and getParameterFromSettings().
Referenced by ApiFormatRaw\__construct(), ApiMain\__construct(), ApiQuerySiteinfo\appendSkins(), ApiFeedRecentChanges\execute(), ApiOpenSearch\getCustomPrinter(), ApiQuery\getCustomPrinter(), ApiMain\handleCORS(), ApiQueryDeletedRevisions\run(), ApiQueryAllRevisions\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryRevisions\run(), ApiMain\sendCacheHeaders(), ApiMain\setCacheMode(), ApiMain\setupExecuteAction(), and ApiMain\substituteResultWithError().
|
protected |
Using the settings determine the value for the given parameter.
string | $paramName | Parameter name |
array | mixed | $paramSettings | Default value or an array of settings using PARAM_* constants. |
bool | $parseLimit | Parse limit? |
Definition at line 919 of file ApiBase.php.
References $key, $name, $type, $value, as, ChangeTags\canAddTagsAccompanyingChange(), dieDebug(), dieStatus(), dieUsage(), dieUsageMsg(), encodeParamName(), getMain(), getModuleManager(), getModuleName(), getResult(), MWNamespace\getValidNamespaces(), logFeatureUsage(), parseMultiValue(), setWarning(), validateLimit(), validateTimestamp(), and validateUser().
Referenced by extractRequestParams(), and getParameter().
ApiBase::getParent | ( | ) |
Get the parent of this module.
Definition at line 498 of file ApiBase.php.
References getMain(), and isMain().
Referenced by getModulePath().
ApiBase::getProfileDBTime | ( | ) |
Definition at line 2957 of file ApiBase.php.
References wfDeprecated().
ApiBase::getProfileTime | ( | ) |
Definition at line 2934 of file ApiBase.php.
References wfDeprecated().
ApiBase::getResult | ( | ) |
Get the result object.
Definition at line 584 of file ApiBase.php.
References dieDebug(), getMain(), and isMain().
Referenced by ApiQueryBase\addPageSubItem(), ApiQueryBase\addPageSubItems(), ApiQuerySiteinfo\appendDbReplLagInfo(), ApiQuerySiteinfo\appendDefaultOptions(), ApiQuerySiteinfo\appendExtensions(), ApiQuerySiteinfo\appendExtensionTags(), ApiQuerySiteinfo\appendFileExtensions(), ApiQuerySiteinfo\appendFunctionHooks(), ApiQuerySiteinfo\appendGeneralInfo(), ApiQuerySiteinfo\appendInstalledLibraries(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendLanguages(), ApiQuerySiteinfo\appendMagicWords(), ApiQuerySiteinfo\appendNamespaceAliases(), ApiQuerySiteinfo\appendNamespaces(), ApiQuerySiteinfo\appendProtocols(), ApiQuerySiteinfo\appendRestrictions(), ApiQuerySiteinfo\appendRightsInfo(), ApiQuerySiteinfo\appendSkins(), ApiQuerySiteinfo\appendSpecialPageAliases(), ApiQuerySiteinfo\appendStatistics(), ApiQuerySiteinfo\appendSubscribedHooks(), ApiQuerySiteinfo\appendUploadDialog(), ApiQuerySiteinfo\appendUserGroups(), ApiQuerySiteinfo\appendVariables(), ApiFormatRaw\closePrinter(), ApiManageTags\execute(), ApiComparePages\execute(), ApiTag\execute(), ApiCheckToken\execute(), ApiProtect\execute(), ApiClearHasMsg\execute(), ApiUndelete\execute(), ApiMergeHistory\execute(), ApiMove\execute(), ApiEmailUser\execute(), ApiTokens\execute(), ApiQueryStashImageInfo\execute(), ApiRsd\execute(), ApiImport\execute(), ApiRevisionDelete\execute(), ApiQueryMyStashedFiles\execute(), ApiWatch\execute(), ApiPatrol\execute(), ApiSetNotificationTimestamp\execute(), ApiQueryTokens\execute(), ApiHelp\execute(), ApiExpandTemplates\execute(), ApiChangeAuthenticationData\execute(), ApiUpload\execute(), ApiOptions\execute(), ApiEditPage\execute(), ApiFormatPhp\execute(), ApiQueryAuthManagerInfo\execute(), ApiQueryTags\execute(), ApiQueryAllMessages\execute(), ApiQueryBlocks\execute(), ApiUnblock\execute(), ApiParamInfo\execute(), ApiPurge\execute(), ApiQueryDeletedrevs\execute(), ApiFileRevert\execute(), ApiQueryPageProps\execute(), ApiQueryFilearchive\execute(), ApiBlock\execute(), ApiFeedContributions\execute(), ApiDelete\execute(), ApiRollback\execute(), ApiQueryLogEvents\execute(), ApiQueryPagePropNames\execute(), ApiQueryUserInfo\execute(), ApiQueryContributions\execute(), ApiQueryFileRepoInfo\execute(), ApiFeedRecentChanges\execute(), ApiParse\execute(), ApiStashEdit\execute(), ApiFormatXml\execute(), ApiRemoveAuthenticationData\execute(), ApiQueryImageInfo\execute(), ApiQueryAllUsers\execute(), ApiQueryContributors\execute(), ApiUserrights\execute(), ApiLinkAccount\execute(), ApiImageRotate\execute(), ApiAMCreateAccount\execute(), ApiFeedWatchlist\execute(), ApiClientLogin\execute(), ApiResetPassword\execute(), ApiLogin\execute(), ApiFormatJson\execute(), ApiFormatRaw\execute(), ApiFormatFeedWrapper\execute(), ApiQueryUsers\execute(), ApiQuery\execute(), ApiQueryInfo\execute(), ApiOpenSearchFormatJson\execute(), ApiFormatRaw\getMimeType(), getParameterFromSettings(), getResultData(), ApiFormatRaw\initPrinter(), ApiFormatFeedWrapper\initPrinter(), ApiQuery\outputGeneralPageInfo(), ApiQueryRevisionsBase\parseParameters(), ApiOpenSearch\populateResult(), ApiQueryAllRevisions\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryPrefixSearch\run(), ApiQueryLangBacklinks\run(), ApiQueryProtectedTitles\run(), ApiQueryIWBacklinks\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryAllCategories\run(), ApiQueryPagesWithProp\run(), ApiQueryWatchlist\run(), ApiQueryQueryPage\run(), ApiQuerySearch\run(), ApiQueryCategoryMembers\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryAllLinks\run(), ApiQueryRandom\run(), ApiQueryRecentChanges\run(), ApiQueryRandom\runQuery(), and ApiUpload\selectUploadModule().
ApiBase::getResultData | ( | ) |
Get the result data array (read-only)
Definition at line 2967 of file ApiBase.php.
References getResult(), and wfDeprecated().
Referenced by ApiFormatPhp\execute(), and ApiOpenSearchFormatJson\execute().
ApiBase::getTitleOrPageId | ( | $params, | |
$load = false |
|||
) |
Get a WikiPage object from a title or pageid param, if possible.
Can die, if no param is set or if the title or page id is not valid.
array | $params | |
bool | string | $load | Whether load the object's state from the database:
|
Definition at line 840 of file ApiBase.php.
References $params, dieUsage(), dieUsageMsg(), WikiPage\factory(), WikiPage\newFromID(), Title\newFromText(), and requireOnlyOneParameter().
Referenced by ApiProtect\execute(), ApiEditPage\execute(), ApiDelete\execute(), ApiStashEdit\execute(), ApiParse\execute(), and ApiQueryCategoryMembers\run().
ApiBase::getWatchlistUser | ( | $params | ) |
Gets the user for whom to get the watchlist.
array | $params |
Definition at line 1406 of file ApiBase.php.
References $params, $user, dieUsage(), ContextSource\getUser(), and User\newFromName().
Referenced by ApiQueryWatchlistRaw\run(), and ApiQueryWatchlist\run().
|
protected |
Return true if we're to watch the page, false if not, null if no change.
string | $watchlist | Valid values: 'watch', 'unwatch', 'preferences', 'nochange' |
Title | $titleObj | The page under consideration |
string | $userOption | The user option to consider when $watchlist=preferences. If not set will use watchdefault always and watchcreations if $titleObj doesn't exist. |
Definition at line 877 of file ApiBase.php.
References ContextSource\getUser(), and User\IGNORE_USER_RIGHTS.
Referenced by ApiEditPage\execute(), ApiUpload\performUpload(), and setWatch().
|
protected |
Fetch the salt used in the Web UI corresponding to this module.
Only override this if the Web UI uses a token with a non-constant salt.
array | $params | All supplied parameters for the module |
Definition at line 433 of file ApiBase.php.
Referenced by validateToken().
|
private |
string | $item |
Definition at line 2703 of file ApiBase.php.
ApiBase::isDeprecated | ( | ) |
Indicates whether this module is deprecated.
Definition at line 388 of file ApiBase.php.
Referenced by getHelpFlags().
ApiBase::isInternal | ( | ) |
Indicates whether this module is "internal" Internal API modules are not (yet) intended for 3rd party use and may be unstable.
Definition at line 398 of file ApiBase.php.
Referenced by getHelpFlags().
ApiBase::isMain | ( | ) |
Returns true if this module is the main module ($this === $this->mMainModule), false otherwise.
Definition at line 489 of file ApiBase.php.
References $mMainModule.
Referenced by __construct(), getContinuationManager(), getErrorFormatter(), getModulePath(), getParent(), getResult(), lacksSameOriginSecurity(), and setContinuationManager().
ApiBase::isReadMode | ( | ) |
Indicates whether this module requires read rights.
Definition at line 363 of file ApiBase.php.
Referenced by getHelpFlags(), and makeHelpMsg().
ApiBase::isWriteMode | ( | ) |
Indicates whether this module requires write mode.
Definition at line 371 of file ApiBase.php.
Referenced by ApiMain\execute(), getHelpFlags(), makeHelpMsg(), and ApiMain\setRequestExpectations().
ApiBase::lacksSameOriginSecurity | ( | ) |
Returns true if the current request breaks the same-origin policy.
For example, json with callbacks.
https://en.wikipedia.org/wiki/Same-origin_policy
Definition at line 512 of file ApiBase.php.
References dieDebug(), getMain(), and isMain().
Referenced by ApiQueryTokens\execute(), ApiQueryDeletedrevs\execute(), ApiLogin\execute(), ApiQueryUserInfo\getCurrentUserInfo(), ApiQueryRevisions\getTokenFunctions(), ApiQueryRecentChanges\getTokenFunctions(), ApiQueryUsers\getTokenFunctions(), ApiQueryInfo\getTokenFunctions(), and ApiTokens\getTokenTypes().
ApiBase::logFeatureUsage | ( | $feature | ) |
Write logging information for API features to a debug log, for usage analysis.
string | $feature | Feature being used. |
Definition at line 2239 of file ApiBase.php.
References $request, $s, getMain(), ContextSource\getRequest(), ContextSource\getUser(), wfDebugLog(), and wfUrlencode().
Referenced by ApiTokens\execute(), ApiExpandTemplates\execute(), ApiQueryDeletedrevs\execute(), ApiLogin\execute(), getParameterFromSettings(), ApiQuerySearch\run(), ApiMain\setupExternalResponse(), and validateTimestamp().
|
protected |
string | $prefix | Text to split output items |
string | $title | What is being output |
string | array | $input |
Definition at line 2714 of file ApiBase.php.
References $title, and wfDeprecated().
Referenced by makeHelpMsg().
ApiBase::makeHelpMsg | ( | ) |
Generates help message for this module, or false if there is no description.
Definition at line 2633 of file ApiBase.php.
References as, getExamples(), getFinalDescription(), getHelpUrls(), isReadMode(), isWriteMode(), makeHelpArrayToString(), makeHelpMsgParameters(), mustBePosted(), and wfDeprecated().
ApiBase::makeHelpMsgParameters | ( | ) |
Generates the parameter descriptions for this module, to be displayed in the module's help.
Definition at line 2743 of file ApiBase.php.
References $params, $s, $t, $type, as, encodeParamName(), GET_VALUES_FOR_HELP, getFinalParamDescription(), getFinalParams(), getModuleManager(), MWNamespace\getValidNamespaces(), PARAM_DFLT, PARAM_TYPE, and wfDeprecated().
Referenced by makeHelpMsg().
|
static |
Create a Message from a string or array.
A string is used as a message key. An array has the message key as the first value and message parameters as subsequent values.
string | array | Message | $msg | |
IContextSource | $context | |
array | $params |
Definition at line 1463 of file ApiBase.php.
References $params, and wfMessage().
Referenced by ApiDocumentationTest\checkMessage(), ApiAMCreateAccount\getFinalDescription(), ApiLinkAccount\getFinalDescription(), ApiClientLogin\getFinalDescription(), getFinalDescription(), getFinalParamDescription(), ApiHelp\getHelpInternal(), and ApiParamInfo\getModuleInfo().
Called from ApiHelp before the pieces are joined together and returned.
This exists mainly for ApiMain to add the Permissions and Credits sections. Other modules probably don't need it.
string[] | &$help Array of help data | |
array | $options | Options passed to ApiHelp::getHelp |
array | &$tocData | If a TOC is being generated, this array has keys as anchors in the page and values as for Linker::generateTOC(). |
Definition at line 2569 of file ApiBase.php.
ApiBase::mustBePosted | ( | ) |
Indicates whether this module must be called with a POST request.
Definition at line 379 of file ApiBase.php.
References needsToken().
Referenced by getHelpFlags(), and makeHelpMsg().
ApiBase::needsToken | ( | ) |
Returns the token type this module requires in order to execute.
Modules are strongly encouraged to use the core 'csrf' type unless they have specialized security needs. If the token type is not one of the core types, you must use the ApiQueryTokensRegisterTypes hook to register it.
Returning a non-falsey value here will force the addition of an appropriate 'token' parameter in self::getFinalParams(). Also, self::mustBePosted() must return true when tokens are used.
In previous versions of MediaWiki, true was a valid return value. Returning true will generate errors indicating that the API module needs updating.
Definition at line 420 of file ApiBase.php.
Referenced by getFinalParams(), mustBePosted(), and validateToken().
|
private |
Callback function used in requireOnlyOneParameter to check whether required parameters are set.
object | $x | Parameter to check is not null/false |
Definition at line 825 of file ApiBase.php.
ApiBase::parseMsg | ( | $error | ) |
Return the error message related to a certain array.
array | $error | Element of a getUserPermissionsErrors()-style array |
Definition at line 2194 of file ApiBase.php.
References $key, array(), and wfMsgReplaceArgs().
Referenced by ApiMain\checkBotReadOnly(), ApiImageRotate\checkPermissions(), dieReadOnly(), ApiUpload\dieRecoverableError(), dieUsageMsg(), dieUsageMsgOrDebug(), ApiUnblock\execute(), ApiPurge\execute(), ApiBlock\execute(), ApiMove\moveSubpages(), and ApiTag\processIndividual().
|
protected |
Return an array of values that were given in a 'a|b|c' notation, after it optionally validates them against the list allowed values.
string | $valueName | The name of the parameter (for error reporting) |
mixed | $value | The value being parsed |
bool | $allowMultiple | Can $value contain more than one value separated by '|'? |
string[]|null | $allowedValues An array of values to check against. If null, all values are accepted. |
Definition at line 1173 of file ApiBase.php.
References $s, $value, dieUsage(), and setWarning().
Referenced by getParameterFromSettings().
ApiBase::profileDBIn | ( | ) |
ApiBase::profileDBOut | ( | ) |
ApiBase::profileIn | ( | ) |
Definition at line 2910 of file ApiBase.php.
ApiBase::profileOut | ( | ) |
Definition at line 2918 of file ApiBase.php.
ApiBase::requireAtLeastOneParameter | ( | $params, | |
$required | |||
) |
Die if none of a certain set of parameters is set and not false.
array | $params | User provided set of parameters, as from $this->extractRequestParams() |
string | $required,... | Names of parameters of which at least one must be set |
Definition at line 770 of file ApiBase.php.
References $params, dieUsage(), and getModulePrefix().
Referenced by ApiTag\execute(), ApiAMCreateAccount\execute(), ApiLinkAccount\execute(), and ApiClientLogin\execute().
ApiBase::requireMaxOneParameter | ( | $params, | |
$required | |||
) |
Die if more than one of a certain set of parameters is set and not false.
array | $params | User provided set of parameters, as from $this->extractRequestParams() |
string | $required,... | Names of parameters of which at most one must be set |
Definition at line 747 of file ApiBase.php.
References $params, dieUsage(), and getModulePrefix().
Referenced by ApiImport\execute(), ApiExpandTemplates\execute(), ApiSetNotificationTimestamp\execute(), ApiQueryBlocks\execute(), ApiQueryLangLinks\execute(), ApiQueryIWLinks\execute(), ApiQueryLogEvents\execute(), ApiQueryContributors\execute(), ApiQueryAllRevisions\run(), and ApiQueryRandom\run().
ApiBase::requireOnlyOneParameter | ( | $params, | |
$required | |||
) |
Die if none or more than one of a certain set of parameters is set and not false.
array | $params | User provided set of parameters, as from $this->extractRequestParams() |
string | $required,... | Names of parameters of which exactly one must be set |
Definition at line 721 of file ApiBase.php.
References $params, dieUsage(), and getModulePrefix().
Referenced by ApiMergeHistory\execute(), ApiMove\execute(), ApiPatrol\execute(), ApiResetPassword\execute(), ApiRollback\getRbTitle(), getTitleOrPageId(), ApiUserrights\getUrUser(), and ApiUpload\selectUploadModule().
ApiBase::requirePostedParameters | ( | $params, | |
$prefix = 'prefix' |
|||
) |
Die if any of the specified parameters were found in the query part of the URL rather than the post body.
string[] | $params Parameters to check | |
string | $prefix | Set to 'noprefix' to skip calling $this->encodeParamName() |
Definition at line 793 of file ApiBase.php.
References $params, as, dieUsage(), encodeParamName(), ContextSource\getConfig(), getMain(), and ContextSource\getRequest().
Referenced by ApiLogin\execute().
ApiBase::safeProfileOut | ( | ) |
ApiBase::setContinuationManager | ( | $manager | ) |
Set the continuation manager.
ApiContinuationManager|null |
Definition at line 638 of file ApiBase.php.
References dieDebug(), getMain(), and isMain().
Referenced by ApiWatch\execute(), ApiSetNotificationTimestamp\execute(), ApiPurge\execute(), ApiImageRotate\execute(), and ApiQuery\execute().
ApiBase::setWarning | ( | $warning | ) |
Set warning section for this module.
Users should monitor this section to notice any changes in API. Multiple calls to this function will result in the warning messages being separated by newlines
string | $warning | Warning message |
Definition at line 1495 of file ApiBase.php.
References getErrorFormatter(), and getModuleName().
Referenced by ApiFormatXml\addXslt(), dieUsageMsgOrDebug(), ApiTokens\execute(), ApiQueryTokens\execute(), ApiExpandTemplates\execute(), ApiOptions\execute(), ApiParamInfo\execute(), ApiPurge\execute(), ApiQueryDeletedrevs\execute(), ApiQueryDisabled\execute(), ApiParse\execute(), ApiLogin\execute(), ApiQueryUsers\execute(), ApiPageSet\executeInternal(), ApiQueryInfo\extractPageInfo(), ApiQueryRevisionsBase\extractRevisionInfo(), ApiQueryRecentChanges\extractRowInfo(), ApiQueryUserInfo\getCurrentUserInfo(), getParameterFromSettings(), ApiMain\getVal(), ApiMain\handleException(), ApiQueryImageInfo\mergeThumbParams(), parseMultiValue(), ApiQueryRevisionsBase\parseParameters(), ApiMain\printResult(), ApiMain\reportUnusedParams(), ApiQueryAllDeletedRevisions\run(), ApiQueryImages\run(), ApiQueryCategories\run(), ApiQuerySearch\run(), ApiQueryLinks\run(), ApiQueryRevisions\run(), ApiMain\setupExternalResponse(), validateTimestamp(), and warnOrDie().
|
protected |
Set a watch (or unwatch) based the based on a watchlist parameter.
string | $watch | Valid values: 'watch', 'unwatch', 'preferences', 'nochange' |
Title | $titleObj | The article's title to change |
string | $userOption | The user option to consider when $watch=preferences |
Definition at line 1375 of file ApiBase.php.
References $value, WatchAction\doWatchOrUnwatch(), ContextSource\getUser(), and getWatchlistValue().
Referenced by ApiProtect\execute(), ApiUndelete\execute(), ApiMove\execute(), ApiDelete\execute(), and ApiRollback\execute().
ApiBase::shouldCheckMaxlag | ( | ) |
Indicates if this module needs maxlag to be checked.
Definition at line 355 of file ApiBase.php.
|
static |
Truncate an array to a certain length.
array | $arr | Array to truncate |
int | $limit | Maximum length |
Definition at line 1390 of file ApiBase.php.
References $limit.
|
protected |
Call wfTransactionalTimeLimit() if this request was POSTed.
Definition at line 2976 of file ApiBase.php.
References ContextSource\getRequest(), and wfTransactionalTimeLimit().
Referenced by ApiUndelete\execute(), ApiMergeHistory\execute(), ApiMove\execute(), ApiRevisionDelete\execute(), ApiImport\execute(), ApiEditPage\execute(), ApiFileRevert\execute(), ApiDelete\execute(), ApiRollback\execute(), and ApiImageRotate\execute().
|
protected |
Validate the value against the minimum and user/bot maximum limits.
Prints usage info on failure.
string | $paramName | Parameter name |
int | $value | Parameter value |
int | null | $min | Minimum value |
int | null | $max | Maximum value for users |
int | $botMax | Maximum value for sysops/bots |
bool | $enforceLimits | Whether to enforce (die) if value is outside limits |
Definition at line 1237 of file ApiBase.php.
References $value, encodeParamName(), getMain(), and warnOrDie().
Referenced by ApiQueryDeletedrevs\execute(), getParameterFromSettings(), and ApiQueryRevisionsBase\parseParameters().
|
protected |
Validate and normalize of parameters of type 'timestamp'.
string | $value | Parameter value |
string | $encParamName | Parameter name |
Definition at line 1276 of file ApiBase.php.
References $value, dieUsage(), logFeatureUsage(), setWarning(), TS_MW, TS_UNIX, and wfTimestamp().
Referenced by getParameterFromSettings().
|
final |
Validate the supplied token.
string | $token | Supplied token |
array | $params | All supplied parameters for the module |
MWException |
Definition at line 1315 of file ApiBase.php.
References ContextSource\getRequest(), ApiQueryTokens\getToken(), ApiQueryTokens\getTokenTypeSalts(), ContextSource\getUser(), getWebUITokenSalt(), and needsToken().
|
private |
Validate and normalize of parameters of type 'user'.
string | $value | Parameter value |
string | $encParamName | Parameter name |
Definition at line 1350 of file ApiBase.php.
References $title, $value, dieUsage(), Title\makeTitleSafe(), and NS_USER.
Referenced by getParameterFromSettings().
|
private |
Adds a warning to the output, else dies.
string | $msg | Message to show as a warning, or error message if dying |
bool | $enforceLimits | Whether this is an enforce (die) |
Definition at line 1506 of file ApiBase.php.
References dieUsage(), and setWarning().
Referenced by validateLimit().
|
staticprivate |
Maps extension paths to info arrays.
Definition at line 200 of file ApiBase.php.
|
static |
Array that maps message keys to error messages.
$1 and friends are replaced.
Definition at line 1625 of file ApiBase.php.
Referenced by ApiErrorFormatter_BackCompat\addWarningOrError(), and getErrorFromStatus().
|
private |
Definition at line 203 of file ApiBase.php.
|
private |
Definition at line 205 of file ApiBase.php.
Referenced by getModuleName().
string ApiBase::$mModulePrefix |
Definition at line 205 of file ApiBase.php.
Referenced by getModulePrefix().
Definition at line 209 of file ApiBase.php.
Referenced by getModuleSourceInfo().
|
private |
Definition at line 207 of file ApiBase.php.
|
private |
Definition at line 206 of file ApiBase.php.
Referenced by getDB().
const ApiBase::GET_VALUES_FOR_HELP = 1 |
getAllowedParams() flag: When set, the result could take longer to generate, but should be more thorough.
E.g. get the list of generators for ApiSandBox extension
Definition at line 197 of file ApiBase.php.
Referenced by ApiQueryLogEvents\getAllowedParams(), ApiPageSet\getAllowedParams(), getFinalParamDescription(), ApiHelp\getHelpInternal(), ApiParamInfo\getModuleInfo(), makeHelpMsgParameters(), and ApiDocumentationTest\testDocumentationExists().
const ApiBase::LIMIT_BIG1 = 500 |
Fast query, standard limit.
Definition at line 184 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryPagePropNames\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryMyStashedFiles\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryRevisionsBase\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRevisionsBase\parseParameters(), and ApiQueryBacklinks\run().
const ApiBase::LIMIT_BIG2 = 5000 |
Fast query, apihighlimits limit.
Definition at line 186 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryPagePropNames\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryMyStashedFiles\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryRevisionsBase\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRevisionsBase\parseParameters(), and ApiQueryBacklinks\run().
const ApiBase::LIMIT_SML1 = 50 |
Slow query, standard limit.
Definition at line 188 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiHelp\getHelpInternal(), ApiParamInfo\getModuleInfo(), and ApiQueryRevisionsBase\parseParameters().
const ApiBase::LIMIT_SML2 = 500 |
Slow query, apihighlimits limit.
Definition at line 190 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiHelp\getHelpInternal(), ApiParamInfo\getModuleInfo(), and ApiQueryRevisionsBase\parseParameters().
const ApiBase::PARAM_ALLOW_DUPLICATES = 6 |
(boolean) Allow the same value to be set more than once when PARAM_ISMULTI is true?
Definition at line 103 of file ApiBase.php.
Referenced by ApiProtect\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), and ApiParamInfo\getModuleInfo().
const ApiBase::PARAM_DEPRECATED = 7 |
(boolean) Is the parameter deprecated (will show a warning)?
Definition at line 106 of file ApiBase.php.
Referenced by ApiQueryStashImageInfo\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiProtect\getAllowedParams(), ApiWatch\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiDelete\getAllowedParams(), ApiMove\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiParamInfo\getAllowedParams(), ApiQueryRevisionsBase\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiParse\getAllowedParams(), ApiUpload\getAllowedParams(), ApiQueryInfo\getAllowedParams(), ApiHelp\getHelpInternal(), and ApiParamInfo\getModuleInfo().
const ApiBase::PARAM_DFLT = 0 |
(null|boolean|integer|string) Default value of the parameter.
Definition at line 50 of file ApiBase.php.
Referenced by ApiManageTags\getAllowedParams(), ApiQueryFileRepoInfo\getAllowedParams(), ApiQueryStashImageInfo\getAllowedParams(), ApiFormatPhp\getAllowedParams(), ApiQueryPagePropNames\getAllowedParams(), ApiTokens\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiQueryTokens\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiRollback\getAllowedParams(), ApiQueryMyStashedFiles\getAllowedParams(), ApiFormatJson\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiFileRevert\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiTag\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiOptions\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiProtect\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiRevisionDelete\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiDelete\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), ApiMove\getAllowedParams(), ApiQueryAllRevisions\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryDeletedRevisions\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiFormatBase\getAllowedParams(), ApiFormatXml\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQueryAllDeletedRevisions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiParamInfo\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryRevisionsBase\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiParse\getAllowedParams(), ApiUpload\getAllowedParams(), ApiHelp\getAllowedParams(), ApiQuerySiteinfo\getAllowedParams(), ApiPageSet\getAllowedParams(), ApiMain\getAllowedParams(), ApiOpenSearch\getFormat(), ApiHelp\getHelpInternal(), ApiParamInfo\getModuleInfo(), ApiAuthManagerHelper\getStandardParams(), and makeHelpMsgParameters().
const ApiBase::PARAM_HELP_MSG = 10 |
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
Default is apihelp-{$path}-param-{$param}.
Definition at line 125 of file ApiBase.php.
Referenced by ApiFormatPhp\getAllowedParams(), ApiQueryStashImageInfo\getAllowedParams(), ApiQueryPagePropNames\getAllowedParams(), ApiQueryCategoryInfo\getAllowedParams(), ApiQueryPageProps\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryMyStashedFiles\getAllowedParams(), ApiFormatJson\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiPurge\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiWatch\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiImageRotate\getAllowedParams(), ApiSetNotificationTimestamp\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiQueryAllRevisions\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiLogin\getAllowedParams(), ApiQueryDeletedRevisions\getAllowedParams(), ApiFormatBase\getAllowedParams(), ApiFormatXml\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQueryAllDeletedRevisions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryRevisionsBase\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQuery\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiParse\getAllowedParams(), ApiQueryInfo\getAllowedParams(), ApiPageSet\getAllowedParams(), getFinalParamDescription(), getFinalParams(), ApiAuthManagerHelper\getStandardParams(), and ApiDocumentationTest\testDocumentationExists().
const ApiBase::PARAM_HELP_MSG_APPEND = 11 |
((string|array|Message)[]) Specify additional i18n messages to append to the normal message for this parameter.
Definition at line 132 of file ApiBase.php.
Referenced by ApiAMCreateAccount\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiRollback\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryAllRevisions\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryAllDeletedRevisions\getAllowedParams(), ApiEditPage\getAllowedParams(), getFinalParamDescription(), and ApiDocumentationTest\testDocumentationExists().
const ApiBase::PARAM_HELP_MSG_INFO = 12 |
(array) Specify additional information tags for the parameter.
Value is an array of arrays, with the first member being the 'tag' for the info and the remaining members being the values. In the help, this is formatted using apihelp-{$path}-paraminfo-{$tag}, which is passed $1 = count, $2 = comma-joined list of values, $3 = module prefix.
Definition at line 142 of file ApiBase.php.
Referenced by ApiQueryRevisions\getAllowedParams(), ApiQueryAllDeletedRevisions\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiHelp\getHelpInternal(), ApiParamInfo\getModuleInfo(), and ApiDocumentationTest\testDocumentationExists().
const ApiBase::PARAM_HELP_MSG_PER_VALUE = 14 |
((string|array|Message)[]) When PARAM_TYPE is an array, this is an array mapping those values to $msg for ApiBase::makeMessage().
Any value not having a mapping will use apihelp-{$path}-paramvalue-{$param}-{$value}.
Definition at line 157 of file ApiBase.php.
Referenced by ApiQueryStashImageInfo\getAllowedParams(), ApiQueryMyStashedFiles\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryUserInfo\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryRevisionsBase\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiParse\getAllowedParams(), ApiQuerySiteinfo\getAllowedParams(), ApiQueryInfo\getAllowedParams(), getFinalParamDescription(), and ApiDocumentationTest\testDocumentationExists().
const ApiBase::PARAM_ISMULTI = 1 |
(boolean) Accept multiple pipe-separated values for this parameter (e.g.
titles)?
Definition at line 53 of file ApiBase.php.
Referenced by ApiQueryFileRepoInfo\getAllowedParams(), ApiQueryStashImageInfo\getAllowedParams(), ApiPatrol\getAllowedParams(), ApiTokens\getAllowedParams(), ApiUnblock\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiQueryPageProps\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiQueryTokens\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiRollback\getAllowedParams(), ApiQueryMyStashedFiles\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiTag\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiOptions\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiProtect\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiRevisionDelete\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiDelete\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), ApiQueryAllRevisions\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryUserInfo\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQueryAllDeletedRevisions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiParamInfo\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryRevisionsBase\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQuery\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiParse\getAllowedParams(), ApiUpload\getAllowedParams(), ApiHelp\getAllowedParams(), ApiQuerySiteinfo\getAllowedParams(), ApiQueryInfo\getAllowedParams(), ApiPageSet\getAllowedParams(), ApiHelp\getHelpInternal(), ApiParamInfo\getModuleInfo(), and ApiAuthManagerHelper\getStandardParams().
const ApiBase::PARAM_MAX = 3 |
(integer) Max value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
Definition at line 91 of file ApiBase.php.
Referenced by ApiQueryPagePropNames\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryMyStashedFiles\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryRevisionsBase\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiUpload\getAllowedParams(), ApiHelp\getHelpInternal(), and ApiParamInfo\getModuleInfo().
const ApiBase::PARAM_MAX2 = 4 |
(integer) Max value allowed for the parameter for users with the apihighlimits right, for PARAM_TYPE 'limit'.
Definition at line 97 of file ApiBase.php.
Referenced by ApiQueryPagePropNames\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryMyStashedFiles\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryRevisionsBase\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiHelp\getHelpInternal(), and ApiParamInfo\getModuleInfo().
const ApiBase::PARAM_MIN = 5 |
(integer) Lowest value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
Definition at line 100 of file ApiBase.php.
Referenced by ApiQueryPagePropNames\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryMyStashedFiles\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryRevisionsBase\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiUpload\getAllowedParams(), ApiHelp\getHelpInternal(), and ApiParamInfo\getModuleInfo().
const ApiBase::PARAM_RANGE_ENFORCE = 9 |
(boolean) For PARAM_TYPE 'integer', enforce PARAM_MIN and PARAM_MAX?
Definition at line 118 of file ApiBase.php.
Referenced by ApiParamInfo\getModuleInfo().
const ApiBase::PARAM_REQUIRED = 8 |
(boolean) Is the parameter required?
Definition at line 112 of file ApiBase.php.
Referenced by ApiCheckToken\getAllowedParams(), ApiManageTags\getAllowedParams(), ApiEmailUser\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiRollback\getAllowedParams(), ApiFileRevert\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiBlock\getAllowedParams(), ApiProtect\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiRevisionDelete\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiImageRotate\getAllowedParams(), ApiMove\getAllowedParams(), ApiLogin\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiStashEdit\getAllowedParams(), getFinalParams(), ApiHelp\getHelpInternal(), ApiParamInfo\getModuleInfo(), and ApiAuthManagerHelper\getStandardParams().
const ApiBase::PARAM_SENSITIVE = 17 |
(boolean) Is the parameter sensitive? Note 'password'-type fields are always sensitive regardless of the value of this field.
Definition at line 179 of file ApiBase.php.
Referenced by ApiCheckToken\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiLogin\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), and getFinalParams().
const ApiBase::PARAM_SUBMODULE_MAP = 15 |
(string[]) When PARAM_TYPE is 'submodule', map parameter values to submodule paths.
Default is to use all modules in $this->getModuleManager() in the group matching the parameter name.
Definition at line 165 of file ApiBase.php.
Referenced by ApiPageSet\getAllowedParams(), ApiHelp\getHelpInternal(), and ApiParamInfo\getModuleInfo().
const ApiBase::PARAM_SUBMODULE_PARAM_PREFIX = 16 |
(string) When PARAM_TYPE is 'submodule', used to indicate the 'g' prefix added by ApiQueryGeneratorBase (and similar if anything else ever does that).
Definition at line 172 of file ApiBase.php.
Referenced by ApiPageSet\getAllowedParams(), and ApiParamInfo\getModuleInfo().
const ApiBase::PARAM_TYPE = 2 |
(string|string[]) Either an array of allowed value strings, or a string type as described below.
If not specified, will be determined from the type of PARAM_DFLT.
Supported string types are:
Definition at line 88 of file ApiBase.php.
Referenced by ApiCheckToken\getAllowedParams(), ApiManageTags\getAllowedParams(), ApiQueryFileRepoInfo\getAllowedParams(), ApiQueryStashImageInfo\getAllowedParams(), ApiFormatPhp\getAllowedParams(), ApiQueryPagePropNames\getAllowedParams(), ApiPatrol\getAllowedParams(), ApiEmailUser\getAllowedParams(), ApiQueryAuthManagerInfo\getAllowedParams(), ApiTokens\getAllowedParams(), ApiUnblock\getAllowedParams(), ApiResetPassword\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiQueryTokens\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiMergeHistory\getAllowedParams(), ApiComparePages\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiRollback\getAllowedParams(), ApiQueryMyStashedFiles\getAllowedParams(), ApiFormatJson\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiFileRevert\getAllowedParams(), ApiImport\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiTag\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiOptions\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiBlock\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiProtect\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiWatch\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiRevisionDelete\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiDelete\getAllowedParams(), ApiImageRotate\getAllowedParams(), ApiSetNotificationTimestamp\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), ApiMove\getAllowedParams(), ApiQueryAllRevisions\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiLogin\getAllowedParams(), ApiQueryDeletedRevisions\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryUserInfo\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQueryAllDeletedRevisions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiStashEdit\getAllowedParams(), ApiParamInfo\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryRevisionsBase\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQuery\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiParse\getAllowedParams(), ApiUpload\getAllowedParams(), ApiQuerySiteinfo\getAllowedParams(), ApiQueryInfo\getAllowedParams(), ApiPageSet\getAllowedParams(), ApiMain\getAllowedParams(), getFinalParamDescription(), getFinalParams(), ApiOpenSearch\getFormat(), ApiHelp\getHelpInternal(), ApiParamInfo\getModuleInfo(), ApiAuthManagerHelper\getStandardParams(), makeHelpMsgParameters(), and ApiDocumentationTest\testDocumentationExists().
const ApiBase::PARAM_VALUE_LINKS = 13 |
(string[]) When PARAM_TYPE is an array, this may be an array mapping those values to page titles which will be linked in the help.
Definition at line 149 of file ApiBase.php.
Referenced by ApiHelp\getHelpInternal().