MediaWiki
REL1_20
|
This abstract class implements many basic API functions, and is the base of all API classes. More...
Public Member Functions | |
__construct ($mainModule, $moduleName, $modulePrefix= '') | |
Constructor. | |
createContext () | |
Create a new RequestContext object to use e.g. | |
dieReadOnly () | |
Helper function for readonly errors. | |
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. | |
dieUsageMsg ($error) | |
Output the error message related to a certain array. | |
encodeParamName ($paramName) | |
This method mangles parameter name based on the prefix supplied to the constructor. | |
execute () | |
Evaluates the parameters, performs the requested query, and sets up the result. | |
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. | |
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. | |
getFinalDescription () | |
Get final module description, after hooks have had a chance to tweak it as needed. | |
getFinalParamDescription () | |
Get final parameter descriptions, after hooks have had a chance to tweak it as needed. | |
getFinalParams () | |
Get final list of parameters, after hooks have had a chance to tweak it as needed. | |
getFinalResultProperties () | |
Get final possible result properties, after hooks have had a chance to tweak it as needed. | |
getHelpUrls () | |
getMain () | |
Get the main module. | |
getModuleName () | |
Get the name of the module being executed by this instance. | |
getModulePrefix () | |
Get parameter prefix (usually two letters or an empty string). | |
getModuleProfileName ($db=false) | |
Get the name of the module as shown in the profiler log. | |
getPossibleErrors () | |
Returns a list of all possible errors returned by the module. | |
getProfileDBTime () | |
Total time the module used the database. | |
getProfileTime () | |
Total time the module was executed. | |
getRequireMaxOneParameterErrorMessages ($params) | |
Generates the possible error requireMaxOneParameter() can die with. | |
getRequireOnlyOneParameterErrorMessages ($params) | |
Generates the possible errors requireOnlyOneParameter() can die with. | |
getResult () | |
Get the result object. | |
getResultData () | |
Get the result data array (read-only) | |
getTitleOrPageId ($params, $load=false) | |
getTitleOrPageIdErrorMessage () | |
getTokenSalt () | |
Returns the token salt if there is one, '' if the module doesn't require a salt, else false if the module doesn't need a token You have also to override needsToken() Value is passed to User::getEditToken. | |
getVersion () | |
Returns a string that identifies the version of the extending class. | |
getWatchlistUser ($params) | |
Gets the user for whom to get the watchlist. | |
isMain () | |
Returns true if this module is the main module ($this === $this->mMainModule), false otherwise. | |
isReadMode () | |
Indicates whether this module requires read rights. | |
isWriteMode () | |
Indicates whether this module requires write mode. | |
makeHelpMsg () | |
Generates help message for this module, or false if there is no description. | |
makeHelpMsg_callback ($matches) | |
Callback for preg_replace_callback() call in makeHelpMsg(). | |
makeHelpMsgParameters () | |
Generates the parameter descriptions for this module, to be displayed in the module's help. | |
mustBePosted () | |
Indicates whether this module must be called with a POST request. | |
needsToken () | |
Returns whether this module requires a token to execute It is used to show possible errors in action=paraminfo see bug 25248. | |
parseErrors ($errors) | |
Parses a list of errors into a standardised format. | |
parseMsg ($error) | |
Return the error message related to a certain array. | |
profileDBIn () | |
Start module profiling. | |
profileDBOut () | |
End database profiling. | |
profileIn () | |
Start module profiling. | |
profileOut () | |
End module profiling. | |
requireMaxOneParameter ($params) | |
Die if more than one of a certain set of parameters is set and not false. | |
requireOnlyOneParameter ($params) | |
Die if none or more than one of a certain set of parameters is set and not false. | |
safeProfileOut () | |
When modules crash, sometimes it is needed to do a profileOut() regardless of the profiling state the module was in. | |
setWarning ($warning) | |
Set warning section for this module. | |
shouldCheckMaxlag () | |
Indicates if this module needs maxlag to be checked. | |
validateLimit ($paramName, &$value, $min, $max, $botMax=null, $enforceLimits=false) | |
Validate the value against the minimum and user/bot maximum limits. | |
validateTimestamp ($value, $paramName) | |
Static Public Member Functions | |
static | debugPrint ($value, $name= 'unknown', $backtrace=false) |
Debugging function that prints a value and an optional backtrace. | |
static | getBaseVersion () |
Returns a string that identifies the version of this class. | |
static | getValidNamespaces () |
static | truncateArray (&$arr, $limit) |
Truncate an array to a certain length. | |
Public Attributes | |
$mDBTime = 0 | |
$mModuleName | |
$mModulePrefix | |
$mModuleTime = 0 | |
const | LIMIT_BIG1 = 500 |
const | LIMIT_BIG2 = 5000 |
const | LIMIT_SML1 = 50 |
const | LIMIT_SML2 = 500 |
const | PARAM_ALLOW_DUPLICATES = 6 |
const | PARAM_DEPRECATED = 7 |
const | PARAM_DFLT = 0 |
const | PARAM_ISMULTI = 1 |
const | PARAM_MAX = 3 |
const | PARAM_MAX2 = 4 |
const | PARAM_MIN = 5 |
const | PARAM_RANGE_ENFORCE = 9 |
const | PARAM_REQUIRED = 8 |
const | PARAM_TYPE = 2 |
const | PROP_LIST = 'LIST' |
const | PROP_NULLABLE = 1 |
const | PROP_ROOT = 'ROOT' |
const | PROP_TYPE = 0 |
Static Public Attributes | |
static | $messageMap |
Array that maps message keys to error messages. | |
Protected Member Functions | |
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. | |
getDB () | |
getDescription () | |
Returns the description string for this module. | |
getExamples () | |
Returns usage examples for this module. | |
getParamDescription () | |
Returns an array of parameter descriptions. | |
getParameter ($paramName, $parseLimit=true) | |
Get a value for the given parameter. | |
getParameterFromSettings ($paramName, $paramSettings, $parseLimit) | |
Using the settings determine the value for the given parameter. | |
getResultProperties () | |
Returns possible properties in the result, grouped by the value of the prop parameter that shows them. | |
getWatchlistValue ($watchlist, $titleObj, $userOption=null) | |
Return true if we're to watch the page, false if not, null if no change. | |
makeHelpArrayToString ($prefix, $title, $input) | |
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. | |
setWatch ($watch, $titleObj, $userOption=null) | |
Set a watch (or unwatch) based the based on a watchlist parameter. | |
Static Protected Member Functions | |
static | addTokenProperties (&$props, $tokenFunctions) |
Add token properties to the array used by getResultProperties, based on a token functions mapping. | |
static | dieDebug ($method, $message) |
Internal code errors should be reported with this method. | |
Private Member Functions | |
indentExampleText ($item) | |
parameterNotEmpty ($x) | |
Callback function used in requireOnlyOneParameter to check whether reequired parameters are set. | |
warnOrDie ($msg, $enforceLimits=false) | |
Adds a warning to the output, else dies. | |
Private Attributes | |
$mDBTimeIn = 0 | |
Profiling: database execution time. | |
$mMainModule | |
$mParamCache = array() | |
$mTimeIn = 0 | |
Profiling: total module execution time. |
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.
Profiling: various methods to allow keeping tabs on various tasks and their time costs
Self-documentation: code to allow the API to document its own state
Definition at line 42 of file ApiBase.php.
ApiBase::__construct | ( | $ | mainModule, |
$ | moduleName, | ||
$ | modulePrefix = '' |
||
) |
Constructor.
$mainModule | ApiMain object |
$moduleName | string Name of this module |
$modulePrefix | string Prefix to use for parameter names |
Reimplemented in ApiQueryGeneratorBase, ApiPageSet, and ApiQueryImageInfo.
Definition at line 78 of file ApiBase.php.
References isMain(), and ContextSource\setContext().
static ApiBase::addTokenProperties | ( | &$ | props, |
$ | tokenFunctions | ||
) | [static, protected] |
Add token properties to the array used by getResultProperties, based on a token functions mapping.
Definition at line 624 of file ApiBase.php.
References PROP_NULLABLE, and PROP_TYPE.
Referenced by ApiQueryUsers\getResultProperties(), ApiQueryRecentChanges\getResultProperties(), ApiQueryRevisions\getResultProperties(), and ApiQueryInfo\getResultProperties().
Create a new RequestContext object to use e.g.
for calls to other parts the software. The object will have the WebRequest and the User object set to the ones used in this instance.
Definition at line 196 of file ApiBase.php.
References ContextSource\getContext(), and wfDeprecated().
static ApiBase::debugPrint | ( | $ | value, |
$ | name = 'unknown' , |
||
$ | backtrace = false |
||
) | [static] |
Debugging function that prints a value and an optional backtrace.
$value | mixed Value to print |
$name | string Description of the printed value |
$backtrace | bool If true, print a backtrace |
Definition at line 1681 of file ApiBase.php.
References $value, print, and wfBacktrace().
static ApiBase::dieDebug | ( | $ | method, |
$ | message | ||
) | [static, protected] |
Internal code errors should be reported with this method.
$method | string Method or function name |
$message | string Error message |
Definition at line 1419 of file ApiBase.php.
References wfDebugDieBacktrace().
Referenced by ApiQueryLinks\__construct(), ApiQueryBase\addJoinConds(), ApiQueryBase\addTables(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\execute(), ApiQueryAllUsers\execute(), ApiLogin\execute(), ApiFormatRaw\execute(), ApiQueryRevisions\execute(), ApiResult\execute(), ApiFormatFeedWrapper\execute(), ApiFormatRaw\getMimeType(), getParameterFromSettings(), getProfileDBTime(), getProfileTime(), getResult(), ApiPageSet\initFromQueryResult(), profileDBIn(), profileDBOut(), profileIn(), profileOut(), ApiFormatXml\recXmlPrint(), ApiResult\setContent(), ApiResult\setElement(), ApiResult\setIndexedTagName(), and ApiFormatWddx\slowWddxPrinter().
Helper function for readonly errors.
Definition at line 1367 of file ApiBase.php.
References dieUsage(), parseMsg(), and wfReadOnlyReason().
Referenced by ApiEditPage\execute().
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.
$description | string One-line human-readable description of the error condition, e.g., "The API requires a valid action parameter" |
$errorCode | string Brief, arbitrary, stable string to allow easy automated identification of the error, e.g., 'unknown_action' |
$httpRespCode | int HTTP response code |
$extradata | array Data to add to the "<error>" element; array in ApiResult format |
UsageException |
Definition at line 1200 of file ApiBase.php.
References encodeParamName(), and Profiler\instance().
Referenced by ApiQuerySiteinfo\appendDbReplLagInfo(), dieReadOnly(), dieUsageMsg(), ApiComparePages\execute(), ApiQueryStashImageInfo\execute(), ApiParse\execute(), ApiQueryDeletedrevs\execute(), ApiQueryLangLinks\execute(), ApiSetNotificationTimestamp\execute(), ApiWatch\execute(), ApiQueryIWLinks\execute(), ApiQueryFilearchive\execute(), ApiEditPage\execute(), ApiHelp\execute(), ApiOptions\execute(), ApiUpload\execute(), ApiUnblock\execute(), ApiQueryBlocks\execute(), ApiQueryImageInfo\execute(), ApiDisabled\execute(), ApiQueryContributions\execute(), ApiQueryLogEvents\execute(), ApiFeedContributions\execute(), ApiBlock\execute(), ApiQueryAllUsers\execute(), ApiFeedWatchlist\execute(), ApiQueryRevisions\execute(), ApiQueryInfo\execute(), ApiPageSet\execute(), ApiQueryAllPages\executeGenerator(), ApiQueryAllImages\executeGenerator(), ApiQueryRevisions\extractRowInfo(), getParameterFromSettings(), ApiParse\getParsedSectionOrText(), ApiQueryImageInfo\getScale(), ApiParse\getSectionText(), getWatchlistUser(), ApiQueryImageInfo\mergeThumbParams(), parseMultiValue(), ApiQueryContributions\prepareQuery(), ApiQueryBase\prepareUrlQuerySearchString(), ApiQueryContributions\prepareUsername(), ApiQueryBlocks\prepareUsername(), requireMaxOneParameter(), requireOnlyOneParameter(), ApiComparePages\revisionOrTitleOrId(), ApiQueryIWBacklinks\run(), ApiQueryImages\run(), ApiQueryLangBacklinks\run(), ApiQuerySearch\run(), ApiQueryWatchlistRaw\run(), ApiQueryAllLinks\run(), ApiQueryAllCategories\run(), ApiQueryDuplicateFiles\run(), ApiQueryCategories\run(), ApiQueryCategoryMembers\run(), ApiQueryWatchlist\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryLinks\run(), ApiQueryRecentChanges\run(), validateTimestamp(), and warnOrDie().
ApiBase::dieUsageMsg | ( | $ | error | ) |
Output the error message related to a certain array.
$error | (array|string) Element of a getUserPermissionsErrors()-style array |
Definition at line 1377 of file ApiBase.php.
References dieUsage(), and parseMsg().
Referenced by ApiParse\execute(), ApiUndelete\execute(), ApiProtect\execute(), ApiMove\execute(), ApiEmailUser\execute(), ApiQueryAllMessages\execute(), ApiWatch\execute(), ApiImport\execute(), ApiQueryLangLinks\execute(), ApiQueryIWLinks\execute(), ApiExpandTemplates\execute(), ApiEditPage\execute(), ApiPatrol\execute(), ApiPurge\execute(), ApiUnblock\execute(), ApiUpload\execute(), ApiQueryBlocks\execute(), ApiOptions\execute(), ApiRollback\execute(), ApiBlock\execute(), ApiDelete\execute(), ApiQueryRevisions\execute(), getParameterFromSettings(), getTitleOrPageId(), ApiUserrights\getUrUser(), ApiQueryBase\keyToTitle(), ApiQueryContributions\prepareQuery(), ApiComparePages\revisionOrTitleOrId(), ApiQueryLangBacklinks\run(), ApiQueryIWBacklinks\run(), ApiQueryWatchlistRaw\run(), ApiQueryCategories\run(), ApiQueryWatchlist\run(), ApiQueryQueryPage\run(), ApiQueryRecentChanges\run(), and ApiQueryBase\titleToKey().
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
$paramName | string Parameter name |
Reimplemented in ApiQueryGeneratorBase.
Definition at line 651 of file ApiBase.php.
Referenced by dieUsage(), getParameterFromSettings(), makeHelpMsgParameters(), ApiQueryBase\setContinueEnumParameter(), and validateLimit().
ApiBase::execute | ( | ) | [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().
Reimplemented in ApiFormatFeedWrapper, ApiResult, ApiMain, ApiPageSet, ApiQuery, ApiQueryInfo, MockApi, ApiQueryRecentChanges, ApiQueryBacklinks, ApiQueryRevisions, ApiQueryUsers, ApiQueryLinks, ApiQueryQueryPage, ApiFormatJson, ApiFormatRaw, ApiFeedWatchlist, ApiFormatXml, ApiQueryAllImages, ApiLogin, ApiQueryAllUsers, ApiDelete, ApiQueryTags, ApiBlock, ApiFeedContributions, ApiFormatDbg, ApiFormatDump, ApiFormatTxt, ApiRollback, ApiDisabled, ApiFileRevert, ApiQueryDisabled, ApiQueryImageInfo, ApiQueryLogEvents, ApiQueryContributions, ApiOptions, ApiQueryBlocks, ApiUnblock, ApiUpload, ApiFormatPhp, ApiFormatWddx, ApiHelp, ApiParamInfo, ApiPurge, ApiEditPage, ApiExpandTemplates, ApiOpenSearch, ApiPatrol, ApiQueryFilearchive, ApiQueryPageProps, ApiQueryRandom, ApiQueryUserInfo, ApiLogout, ApiQueryAllCategories, ApiQueryCategoryInfo, ApiQueryImages, ApiQueryIWLinks, ApiQueryWatchlist, ApiQueryWatchlistRaw, ApiUserrights, ApiImport, ApiQueryAllLinks, ApiQueryAllMessages, ApiQueryAllPages, ApiQueryCategories, ApiQueryCategoryMembers, ApiQueryDeletedrevs, ApiQueryDuplicateFiles, ApiQueryExternalLinks, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryLangLinks, ApiQueryProtectedTitles, ApiQuerySearch, ApiQuerySiteinfo, ApiRsd, ApiSetNotificationTimestamp, ApiWatch, ApiEmailUser, ApiMove, ApiTokens, ApiProtect, ApiQueryExtLinksUsage, ApiUndelete, ApiParse, ApiQueryStashImageInfo, and ApiComparePages.
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.
$parseLimit | Boolean: true by default |
Definition at line 664 of file ApiBase.php.
References $params, getFinalParams(), and getParameterFromSettings().
Referenced by ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendLanguages(), ApiComparePages\execute(), ApiQueryStashImageInfo\execute(), ApiParse\execute(), ApiUndelete\execute(), ApiProtect\execute(), ApiMove\execute(), ApiTokens\execute(), ApiEmailUser\execute(), ApiSetNotificationTimestamp\execute(), ApiQueryDeletedrevs\execute(), ApiQueryExternalLinks\execute(), ApiWatch\execute(), ApiQueryLangLinks\execute(), ApiQuerySiteinfo\execute(), ApiImport\execute(), ApiQueryAllMessages\execute(), ApiQueryCategoryInfo\execute(), ApiUserrights\execute(), ApiQueryIWLinks\execute(), ApiOpenSearch\execute(), ApiQueryFilearchive\execute(), ApiEditPage\execute(), ApiPatrol\execute(), ApiQueryPageProps\execute(), ApiExpandTemplates\execute(), ApiQueryUserInfo\execute(), ApiParamInfo\execute(), ApiHelp\execute(), ApiPurge\execute(), ApiUnblock\execute(), ApiUpload\execute(), ApiOptions\execute(), ApiQueryBlocks\execute(), ApiQueryImageInfo\execute(), ApiFileRevert\execute(), ApiQueryLogEvents\execute(), ApiQueryContributions\execute(), ApiRollback\execute(), ApiFeedContributions\execute(), ApiBlock\execute(), ApiQueryTags\execute(), ApiDelete\execute(), ApiQueryAllUsers\execute(), ApiLogin\execute(), ApiFeedWatchlist\execute(), ApiFormatXml\execute(), ApiFormatJson\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\execute(), ApiQueryInfo\execute(), ApiPageSet\execute(), ApiFormatJson\getMimeType(), ApiUserrights\getUrUser(), ApiQuerySearch\run(), ApiQueryIWBacklinks\run(), ApiQueryProtectedTitles\run(), ApiQueryImages\run(), ApiQueryLangBacklinks\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryCategories\run(), ApiQueryCategoryMembers\run(), ApiQueryAllCategories\run(), ApiQueryAllLinks\run(), ApiQueryDuplicateFiles\run(), ApiQueryWatchlist\run(), ApiQueryAllPages\run(), ApiQueryQueryPage\run(), ApiQueryAllImages\run(), ApiQueryLinks\run(), ApiQueryRandom\run(), and ApiQueryRecentChanges\run().
ApiBase::getAllowedParams | ( | ) | [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.
Reimplemented in ApiMain, ApiPageSet, ApiQueryInfo, ApiQuery, ApiUpload, ApiQuerySiteinfo, ApiQueryRevisions, ApiQueryRecentChanges, ApiParse, ApiQueryBacklinks, ApiQueryImageInfo, ApiEditPage, ApiQueryContributions, ApiQueryLogEvents, ApiParamInfo, ApiQueryWatchlist, ApiQueryAllUsers, ApiQueryDeletedrevs, ApiQueryUsers, ApiQueryAllImages, ApiQueryCategoryMembers, ApiQueryBlocks, ApiFormatXml, ApiQueryFilearchive, ApiQueryAllPages, ApiQueryAllMessages, ApiQuerySearch, ApiQueryLinks, ApiQueryUserInfo, ApiQueryCategories, ApiSetNotificationTimestamp, ApiMove, ApiLogin, ApiDelete, ApiFeedWatchlist, ApiQueryAllLinks, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryDuplicateFiles, MockApi, ApiQueryAllCategories, ApiBlock, ApiQueryQueryPage, ApiQueryProtectedTitles, ApiQueryExtLinksUsage, ApiQueryImages, ApiFeedContributions, ApiQueryRandom, ApiQueryIWLinks, ApiProtect, ApiQueryWatchlistRaw, ApiQueryTags, ApiQueryLangLinks, ApiPurge, ApiQueryPageProps, ApiFileRevert, ApiHelp, ApiOptions, ApiImport, ApiQueryExternalLinks, ApiUnblock, ApiComparePages, ApiQueryCategoryInfo, ApiUndelete, ApiEmailUser, ApiUserrights, ApiOpenSearch, ApiWatch, ApiExpandTemplates, ApiTokens, ApiRollback, ApiQueryStashImageInfo, ApiFormatJson, ApiPatrol, ApiRsd, ApiLogout, ApiDisabled, and ApiQueryDisabled.
Definition at line 550 of file ApiBase.php.
Referenced by getFinalParams().
static ApiBase::getBaseVersion | ( | ) | [static] |
Returns a string that identifies the version of this class.
Reimplemented in ApiQueryBase, and ApiFormatBase.
Definition at line 1694 of file ApiBase.php.
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.
Reimplemented in ApiQuery, ApiRsd, ApiFeedWatchlist, ApiFeedContributions, and ApiOpenSearch.
Definition at line 235 of file ApiBase.php.
ApiBase::getDB | ( | ) | [protected] |
Reimplemented in ApiQueryBase, ApiQuery, and ApiQueryAllImages.
Definition at line 1671 of file ApiBase.php.
References wfGetDB().
Referenced by ApiProtect\execute(), ApiSetNotificationTimestamp\execute(), and ApiBlock\execute().
ApiBase::getDescription | ( | ) | [protected] |
Returns the description string for this module.
Reimplemented in ApiMain, ApiQueryInfo, ApiQuery, ApiQueryRecentChanges, ApiQueryRevisions, ApiUpload, ApiQueryImageInfo, ApiQuerySiteinfo, ApiParse, ApiQueryContributions, ApiQueryBacklinks, ApiQueryLogEvents, ApiQueryWatchlist, ApiQueryAllUsers, ApiQueryCategoryMembers, ApiQueryDeletedrevs, ApiQueryUsers, ApiQueryBlocks, ApiEditPage, ApiQueryFilearchive, ApiQueryAllImages, ApiParamInfo, ApiQuerySearch, ApiQueryAllPages, ApiFormatBase, ApiQueryUserInfo, ApiQueryAllMessages, ApiMove, ApiQueryCategories, ApiLogin, ApiQueryProtectedTitles, ApiQueryExtLinksUsage, ApiFormatXml, ApiSetNotificationTimestamp, ApiQueryAllLinks, ApiQueryLinks, ApiBlock, ApiDelete, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryAllCategories, ApiFeedWatchlist, ApiQueryQueryPage, ApiQueryWatchlistRaw, ApiQueryDuplicateFiles, ApiProtect, ApiQueryTags, ApiFeedContributions, ApiQueryImages, ApiQueryIWLinks, ApiQueryLangLinks, ApiQueryRandom, ApiFileRevert, ApiPurge, ApiUnblock, ApiImport, ApiOptions, ApiTokens, ApiComparePages, ApiQueryExternalLinks, ApiUndelete, ApiQueryCategoryInfo, ApiEmailUser, ApiQueryPageProps, ApiHelp, ApiRollback, ApiQueryStashImageInfo, ApiUserrights, ApiWatch, ApiExpandTemplates, ApiOpenSearch, ApiFormatWddx, ApiPatrol, ApiFormatJson, ApiRsd, ApiLogout, ApiDisabled, ApiQueryDisabled, ApiFormatDump, ApiFormatDbg, ApiFormatTxt, ApiFormatPhp, and ApiFormatYaml.
Definition at line 531 of file ApiBase.php.
Referenced by getFinalDescription().
ApiBase::getExamples | ( | ) | [protected] |
Returns usage examples for this module.
Return false if no examples are available.
Reimplemented in ApiQueryInfo, ApiQueryRevisions, ApiQuery, ApiQueryRecentChanges, ApiUpload, ApiQueryImageInfo, ApiQuerySiteinfo, ApiParse, ApiEditPage, ApiQueryBacklinks, ApiQueryContributions, ApiQueryLogEvents, ApiQueryWatchlist, ApiQueryAllUsers, ApiQueryDeletedrevs, ApiQueryCategoryMembers, ApiQueryBlocks, ApiQueryUsers, ApiQueryAllImages, ApiQueryFilearchive, ApiParamInfo, ApiQuerySearch, ApiQueryAllPages, ApiFormatBase, ApiQueryUserInfo, ApiMove, ApiQueryAllMessages, ApiLogin, ApiSetNotificationTimestamp, ApiQueryCategories, ApiQueryExtLinksUsage, ApiDelete, ApiQueryProtectedTitles, ApiBlock, ApiQueryAllLinks, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryLinks, ApiQueryAllCategories, ApiProtect, ApiFeedWatchlist, ApiQueryWatchlistRaw, ApiQueryQueryPage, ApiQueryDuplicateFiles, ApiFeedContributions, ApiRollback, ApiQueryImages, ApiQueryIWLinks, ApiQueryTags, ApiFileRevert, ApiQueryLangLinks, ApiQueryRandom, ApiImport, ApiPurge, ApiUnblock, ApiOptions, ApiUndelete, ApiComparePages, ApiEmailUser, ApiQueryExternalLinks, ApiTokens, ApiQueryCategoryInfo, ApiQueryPageProps, ApiHelp, ApiUserrights, ApiQueryStashImageInfo, ApiWatch, ApiExpandTemplates, ApiOpenSearch, ApiPatrol, ApiRsd, ApiLogout, ApiDisabled, and ApiQueryDisabled.
Definition at line 539 of file ApiBase.php.
Referenced by makeHelpMsg().
Get final module description, after hooks have had a chance to tweak it as needed.
Definition at line 639 of file ApiBase.php.
References getDescription(), and wfRunHooks().
Referenced by makeHelpMsg().
Get final parameter descriptions, after hooks have had a chance to tweak it as needed.
Definition at line 582 of file ApiBase.php.
References getParamDescription(), and wfRunHooks().
Referenced by makeHelpMsgParameters().
Get final list of parameters, after hooks have had a chance to tweak it as needed.
Definition at line 570 of file ApiBase.php.
References $params, getAllowedParams(), and wfRunHooks().
Referenced by extractRequestParams(), getParameter(), getPossibleErrors(), and makeHelpMsgParameters().
Get final possible result properties, after hooks have had a chance to tweak it as needed.
Definition at line 614 of file ApiBase.php.
References getResultProperties(), and wfRunHooks().
Reimplemented in ApiQueryInfo, ApiQueryRevisions, ApiQuery, ApiQueryRecentChanges, ApiUpload, ApiQueryImageInfo, ApiQuerySiteinfo, ApiParse, ApiEditPage, ApiQueryBacklinks, ApiQueryContributions, ApiQueryLogEvents, ApiQueryWatchlist, ApiQueryAllUsers, ApiQueryDeletedrevs, ApiQueryCategoryMembers, ApiQueryBlocks, ApiQueryAllImages, ApiQueryUsers, ApiParamInfo, ApiQueryAllPages, ApiQuerySearch, ApiFormatBase, ApiQueryUserInfo, ApiMove, ApiQueryAllMessages, ApiLogin, ApiSetNotificationTimestamp, ApiQueryCategories, ApiQueryExtLinksUsage, ApiDelete, ApiQueryProtectedTitles, ApiBlock, ApiQueryAllLinks, ApiQueryLinks, ApiQueryAllCategories, ApiProtect, ApiFeedWatchlist, ApiQueryDuplicateFiles, ApiRollback, ApiQueryImages, ApiQueryLangLinks, ApiImport, ApiPurge, ApiUnblock, ApiUndelete, ApiOptions, ApiEmailUser, ApiQueryExternalLinks, ApiHelp, ApiQueryCategoryInfo, ApiQueryPageProps, ApiUserrights, ApiWatch, ApiExpandTemplates, ApiOpenSearch, ApiPatrol, and ApiLogout.
Definition at line 1504 of file ApiBase.php.
Referenced by makeHelpMsg().
ApiBase::getMain | ( | ) |
Get the main module.
Definition at line 153 of file ApiBase.php.
Referenced by ApiParamInfo\__construct(), ApiQueryBase\__construct(), ApiParse\execute(), ApiQueryDeletedrevs\execute(), ApiExpandTemplates\execute(), ApiOpenSearch\execute(), ApiParamInfo\execute(), ApiPurge\execute(), ApiHelp\execute(), ApiUpload\execute(), ApiUnblock\execute(), ApiBlock\execute(), ApiLogin\execute(), ApiFeedWatchlist\execute(), ApiQueryRevisions\execute(), ApiParamInfo\getAllowedParams(), ApiQueryUserInfo\getCurrentUserInfo(), ApiOpenSearch\getCustomPrinter(), ApiFeedContributions\getCustomPrinter(), ApiFeedWatchlist\getCustomPrinter(), ApiRsd\getCustomPrinter(), getParameterFromSettings(), getResult(), ApiQueryUsers\getTokenFunctions(), ApiQueryRevisions\getTokenFunctions(), ApiQueryRecentChanges\getTokenFunctions(), ApiQueryInfo\getTokenFunctions(), ApiTokens\getTokenTypes(), ApiFormatBase\initPrinter(), makeHelpMsg(), profileDBOut(), and validateLimit().
Get the name of the module being executed by this instance.
Definition at line 122 of file ApiBase.php.
Referenced by ApiQueryBase\addPageSubItem(), ApiQueryBase\addPageSubItems(), ApiQueryTags\doTag(), ApiComparePages\execute(), ApiQueryStashImageInfo\execute(), ApiParse\execute(), ApiProtect\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiTokens\execute(), ApiMove\execute(), ApiQueryDeletedrevs\execute(), ApiQueryAllMessages\execute(), ApiSetNotificationTimestamp\execute(), ApiImport\execute(), ApiWatch\execute(), ApiUserrights\execute(), ApiExpandTemplates\execute(), ApiQueryFilearchive\execute(), ApiPatrol\execute(), ApiEditPage\execute(), ApiQueryUserInfo\execute(), ApiParamInfo\execute(), ApiPurge\execute(), ApiHelp\execute(), ApiUpload\execute(), ApiUnblock\execute(), ApiQueryBlocks\execute(), ApiOptions\execute(), ApiQueryLogEvents\execute(), ApiFileRevert\execute(), ApiQueryContributions\execute(), ApiRollback\execute(), ApiBlock\execute(), ApiDelete\execute(), ApiQueryTags\execute(), ApiQueryAllUsers\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\execute(), ApiQueryLinks\getExamples(), ApiFormatBase\getExamples(), getParameterFromSettings(), ApiQueryAllLinks\getPossibleErrors(), getPossibleErrors(), ApiQueryIWBacklinks\run(), ApiQueryLangBacklinks\run(), ApiQueryProtectedTitles\run(), ApiQuerySearch\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryCategoryMembers\run(), ApiQueryAllCategories\run(), ApiQueryAllLinks\run(), ApiQueryWatchlist\run(), ApiQueryAllPages\run(), ApiQueryQueryPage\run(), ApiQueryAllImages\run(), ApiQueryRandom\run(), ApiQueryRecentChanges\run(), ApiQueryRandom\runQuery(), ApiQueryBase\setContinueEnumParameter(), and setWarning().
Get parameter prefix (usually two letters or an empty string).
Definition at line 130 of file ApiBase.php.
Referenced by ApiQueryBase\addPageSubItem(), ApiQueryBase\addPageSubItems(), ApiQueryStashImageInfo\execute(), ApiQueryDeletedrevs\getDescription(), ApiQueryStashImageInfo\getParamDescription(), ApiUnblock\getParamDescription(), ApiQueryExternalLinks\getParamDescription(), ApiProtect\getParamDescription(), ApiQueryProtectedTitles\getParamDescription(), ApiQueryExtLinksUsage\getParamDescription(), ApiQueryAllLinks\getParamDescription(), ApiDelete\getParamDescription(), ApiMove\getParamDescription(), ApiQueryBlocks\getParamDescription(), ApiQueryAllPages\getParamDescription(), ApiQueryAllImages\getParamDescription(), ApiQueryCategoryMembers\getParamDescription(), ApiQueryDeletedrevs\getParamDescription(), ApiQueryWatchlist\getParamDescription(), ApiQueryLogEvents\getParamDescription(), ApiQueryContributions\getParamDescription(), ApiEditPage\getParamDescription(), ApiQueryImageInfo\getParamDescription(), ApiParse\getParamDescription(), ApiQueryRecentChanges\getParamDescription(), ApiQuerySiteinfo\getParamDescription(), ApiQueryRevisions\getParamDescription(), ApiQueryAllImages\getPossibleErrors(), ApiQueryImageInfo\getPossibleErrors(), getRequireMaxOneParameterErrorMessages(), getRequireOnlyOneParameterErrorMessages(), ApiQueryImageInfo\getScale(), ApiQueryImageInfo\mergeThumbParams(), requireMaxOneParameter(), requireOnlyOneParameter(), ApiQueryProtectedTitles\run(), ApiQueryExtLinksUsage\run(), and ApiQueryAllImages\run().
ApiBase::getModuleProfileName | ( | $ | db = false | ) |
Get the name of the module as shown in the profiler log.
$db | DatabaseBase|bool |
Definition at line 141 of file ApiBase.php.
Referenced by profileDBIn(), profileDBOut(), profileIn(), and profileOut().
ApiBase::getParamDescription | ( | ) | [protected] |
Returns an array of parameter descriptions.
Don't call this functon directly: use getFinalParamDescription() to allow hooks to modify descriptions as needed.
Reimplemented in ApiMain, ApiPageSet, ApiQueryInfo, ApiQuery, ApiUpload, ApiQueryRevisions, ApiQuerySiteinfo, ApiQueryRecentChanges, ApiParse, ApiQueryImageInfo, ApiQueryBacklinks, ApiEditPage, ApiQueryContributions, ApiQueryLogEvents, ApiQueryWatchlist, ApiQueryAllUsers, ApiParamInfo, ApiQueryDeletedrevs, ApiQueryCategoryMembers, ApiQueryAllImages, ApiQueryUsers, ApiQueryAllPages, ApiQueryBlocks, ApiQueryFilearchive, ApiQuerySearch, ApiFormatXml, ApiQueryAllMessages, ApiQueryCategories, ApiMove, ApiQueryLinks, ApiQueryUserInfo, ApiDelete, ApiQueryAllLinks, ApiQueryExtLinksUsage, ApiFeedWatchlist, ApiSetNotificationTimestamp, ApiQueryProtectedTitles, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryAllCategories, ApiLogin, ApiQueryDuplicateFiles, ApiQueryWatchlistRaw, ApiBlock, ApiFeedContributions, ApiProtect, ApiQueryQueryPage, ApiQueryImages, ApiQueryIWLinks, ApiQueryTags, ApiQueryRandom, ApiQueryLangLinks, ApiTokens, ApiFileRevert, ApiOptions, ApiPurge, ApiQueryPageProps, ApiHelp, ApiImport, ApiQueryExternalLinks, ApiUndelete, ApiComparePages, ApiUnblock, ApiQueryStashImageInfo, ApiUserrights, ApiEmailUser, ApiRollback, ApiOpenSearch, ApiQueryCategoryInfo, ApiWatch, ApiExpandTemplates, ApiFormatJson, ApiPatrol, ApiRsd, ApiLogout, ApiDisabled, and ApiQueryDisabled.
Definition at line 560 of file ApiBase.php.
Referenced by getFinalParamDescription().
ApiBase::getParameter | ( | $ | paramName, |
$ | parseLimit = true |
||
) | [protected] |
Get a value for the given parameter.
$paramName | string Parameter name |
$parseLimit | bool see extractRequestParams() |
Definition at line 687 of file ApiBase.php.
References $params, getFinalParams(), and getParameterFromSettings().
Referenced by ApiMain\sendCacheHeaders().
ApiBase::getParameterFromSettings | ( | $ | paramName, |
$ | paramSettings, | ||
$ | parseLimit | ||
) | [protected] |
Using the settings determine the value for the given parameter.
$paramName | String: parameter name |
$paramSettings | array|mixed default value or an array of settings using PARAM_* constants. |
$parseLimit | Boolean: parse limit? |
Definition at line 897 of file ApiBase.php.
References $title, $value, dieDebug(), dieUsage(), dieUsageMsg(), encodeParamName(), getMain(), getModuleName(), ContextSource\getRequest(), getResult(), getValidNamespaces(), Title\makeTitleSafe(), PARAM_ALLOW_DUPLICATES, PARAM_DEPRECATED, PARAM_DFLT, PARAM_ISMULTI, PARAM_MAX, PARAM_MAX2, PARAM_MIN, PARAM_RANGE_ENFORCE, PARAM_REQUIRED, PARAM_TYPE, parseMultiValue(), setWarning(), validateLimit(), and validateTimestamp().
Referenced by extractRequestParams(), and getParameter().
Returns a list of all possible errors returned by the module.
Reimplemented in ApiMain, ApiQueryInfo, ApiPageSet, ApiQuery, ApiQueryRevisions, ApiQueryRecentChanges, ApiUpload, ApiQueryImageInfo, ApiQuerySiteinfo, ApiParse, ApiQueryBase, ApiQueryBacklinks, ApiQueryContributions, ApiQueryLogEvents, ApiQueryWatchlist, ApiQueryAllUsers, ApiQueryCategoryMembers, ApiQueryDeletedrevs, ApiQueryBlocks, ApiEditPage, ApiQueryFilearchive, ApiQueryAllImages, ApiQuerySearch, ApiQueryAllPages, ApiMove, ApiLogin, ApiQueryCategories, ApiSetNotificationTimestamp, ApiQueryExtLinksUsage, ApiQueryAllLinks, ApiBlock, ApiDelete, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryAllCategories, ApiFeedWatchlist, ApiQueryQueryPage, ApiQueryWatchlistRaw, ApiQueryDuplicateFiles, ApiProtect, ApiFeedContributions, ApiQueryImages, ApiQueryIWLinks, ApiQueryLangLinks, ApiFileRevert, ApiPurge, ApiImport, ApiUnblock, ApiComparePages, ApiOptions, ApiQueryExternalLinks, ApiUndelete, ApiEmailUser, ApiRollback, ApiWatch, ApiExpandTemplates, and ApiPatrol.
Definition at line 1512 of file ApiBase.php.
References $params, getFinalParams(), getModuleName(), isReadMode(), isWriteMode(), mustBePosted(), needsToken(), and PARAM_REQUIRED.
Total time the module used the database.
Definition at line 1661 of file ApiBase.php.
References dieDebug().
Total time the module was executed.
Definition at line 1612 of file ApiBase.php.
References dieDebug().
ApiBase::getRequireMaxOneParameterErrorMessages | ( | $ | params | ) |
Generates the possible error requireMaxOneParameter() can die with.
$params | array |
Definition at line 752 of file ApiBase.php.
References $params, and getModulePrefix().
Referenced by ApiSetNotificationTimestamp\getPossibleErrors().
ApiBase::getRequireOnlyOneParameterErrorMessages | ( | $ | params | ) |
Generates the possible errors requireOnlyOneParameter() can die with.
$params | array |
Definition at line 718 of file ApiBase.php.
References $params, and getModulePrefix().
Referenced by ApiSetNotificationTimestamp\getPossibleErrors(), ApiMove\getPossibleErrors(), ApiQueryBlocks\getPossibleErrors(), ApiUpload\getPossibleErrors(), and getTitleOrPageIdErrorMessage().
Get the result object.
Reimplemented in ApiMain.
Definition at line 170 of file ApiBase.php.
References dieDebug(), getMain(), and isMain().
Referenced by ApiQueryBase\addPageSubItem(), ApiQueryBase\addPageSubItems(), ApiQuerySiteinfo\appendDbReplLagInfo(), ApiQuerySiteinfo\appendExtensions(), ApiQuerySiteinfo\appendExtensionTags(), ApiQuerySiteinfo\appendFileExtensions(), ApiQuerySiteinfo\appendFunctionHooks(), ApiQuerySiteinfo\appendGeneralInfo(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendLanguages(), ApiQuerySiteinfo\appendMagicWords(), ApiQuerySiteinfo\appendNamespaceAliases(), ApiQuerySiteinfo\appendNamespaces(), ApiQuerySiteinfo\appendRightsInfo(), ApiQuerySiteinfo\appendSkins(), ApiQuerySiteinfo\appendSpecialPageAliases(), ApiQuerySiteinfo\appendStatistics(), ApiQuerySiteinfo\appendSubscribedHooks(), ApiQuerySiteinfo\appendUserGroups(), ApiQuerySiteinfo\appendVariables(), ApiComparePages\execute(), ApiQueryStashImageInfo\execute(), ApiParse\execute(), ApiUndelete\execute(), ApiProtect\execute(), ApiMove\execute(), ApiEmailUser\execute(), ApiTokens\execute(), ApiQueryAllMessages\execute(), ApiQueryDeletedrevs\execute(), ApiRsd\execute(), ApiSetNotificationTimestamp\execute(), ApiWatch\execute(), ApiImport\execute(), ApiUserrights\execute(), ApiExpandTemplates\execute(), ApiOpenSearch\execute(), ApiQueryUserInfo\execute(), ApiQueryFilearchive\execute(), ApiQueryPageProps\execute(), ApiPatrol\execute(), ApiEditPage\execute(), ApiParamInfo\execute(), ApiHelp\execute(), ApiPurge\execute(), ApiOptions\execute(), ApiQueryBlocks\execute(), ApiUnblock\execute(), ApiUpload\execute(), ApiQueryContributions\execute(), ApiQueryImageInfo\execute(), ApiQueryLogEvents\execute(), ApiFileRevert\execute(), ApiRollback\execute(), ApiBlock\execute(), ApiFeedContributions\execute(), ApiQueryTags\execute(), ApiDelete\execute(), ApiQueryAllUsers\execute(), ApiLogin\execute(), ApiFeedWatchlist\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\execute(), ApiQueryInfo\execute(), ApiQueryInfo\extractPageInfo(), ApiQueryWatchlist\extractRowInfo(), ApiQueryLogEvents\extractRowInfo(), ApiQueryContributions\extractRowInfo(), ApiQueryRecentChanges\extractRowInfo(), ApiQueryRevisions\extractRowInfo(), ApiParse\formatCategoryLinks(), ApiParse\formatCss(), ApiParse\formatHeadItems(), ApiParse\formatIWLinks(), ApiParse\formatLangLinks(), ApiParse\formatLinks(), ApiParse\formatProperties(), ApiRsd\formatRsdApiList(), ApiQueryUserInfo\getCurrentUserInfo(), getParameterFromSettings(), getResultData(), ApiQueryLangBacklinks\run(), ApiQueryIWBacklinks\run(), ApiQuerySearch\run(), ApiQueryProtectedTitles\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryAllCategories\run(), ApiQueryAllLinks\run(), ApiQueryCategoryMembers\run(), ApiQueryWatchlist\run(), ApiQueryAllPages\run(), ApiQueryQueryPage\run(), ApiQueryAllImages\run(), ApiQueryRandom\run(), ApiQueryRecentChanges\run(), ApiQueryRandom\runQuery(), ApiQueryBase\setContinueEnumParameter(), ApiParse\setIndexedTagNames(), setWarning(), and ApiUpload\transformWarnings().
Get the result data array (read-only)
Definition at line 183 of file ApiBase.php.
References getResult().
Referenced by ApiFormatPhp\execute(), ApiFormatWddx\execute(), ApiQueryImageInfo\execute(), ApiFormatDbg\execute(), ApiFormatTxt\execute(), ApiFormatDump\execute(), ApiFormatXml\execute(), ApiFormatRaw\execute(), ApiFormatJson\execute(), ApiFormatFeedWrapper\execute(), and ApiFormatRaw\getMimeType().
ApiBase::getResultProperties | ( | ) | [protected] |
Returns possible properties in the result, grouped by the value of the prop parameter that shows them.
Properties that are shown always are in a group with empty string as a key. Properties that can be shown by several values of prop are included multiple times. If some properties are part of a list and some are on the root object (see ApiQueryQueryPage), those on the root object are under the key PROP_ROOT. The array can also contain a boolean under the key PROP_LIST, indicating whether the result is a list.
Don't call this functon directly: use getFinalResultProperties() to allow hooks to modify descriptions as needed.
Reimplemented in ApiQueryInfo, ApiQueryImageInfo, ApiQueryRevisions, ApiUpload, ApiQueryRecentChanges, ApiQueryBacklinks, ApiEditPage, ApiQueryContributions, ApiQueryLogEvents, ApiQueryWatchlist, ApiQueryAllUsers, ApiQueryDeletedrevs, ApiQueryCategoryMembers, ApiQueryAllImages, ApiQueryBlocks, ApiQueryAllPages, ApiQueryUsers, ApiQueryFilearchive, ApiQuerySearch, ApiQueryAllMessages, ApiQueryCategories, ApiMove, ApiQueryExtLinksUsage, ApiQueryUserInfo, ApiQueryLinks, ApiQueryAllLinks, ApiDelete, ApiQueryProtectedTitles, ApiSetNotificationTimestamp, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryAllCategories, ApiLogin, ApiBlock, ApiQueryWatchlistRaw, ApiQueryDuplicateFiles, ApiProtect, ApiQueryQueryPage, ApiQueryImages, ApiQueryTags, ApiQueryIWLinks, ApiQueryRandom, ApiQueryLangLinks, ApiFileRevert, ApiImport, ApiPurge, ApiQueryExternalLinks, ApiComparePages, ApiUndelete, ApiOptions, ApiQueryStashImageInfo, ApiUnblock, ApiRollback, ApiEmailUser, ApiQueryCategoryInfo, ApiExpandTemplates, ApiWatch, ApiTokens, ApiPatrol, and ApiLogout.
Definition at line 604 of file ApiBase.php.
Referenced by getFinalResultProperties().
ApiBase::getTitleOrPageId | ( | $ | params, |
$ | load = false |
||
) |
$params | array |
$load | bool|string Whether load the object's state from the database:
|
Definition at line 769 of file ApiBase.php.
References $params, dieUsageMsg(), WikiPage\factory(), WikiPage\newFromID(), Title\newFromText(), and requireOnlyOneParameter().
Referenced by ApiParse\execute(), ApiProtect\execute(), ApiEditPage\execute(), ApiDelete\execute(), and ApiQueryCategoryMembers\run().
Definition at line 798 of file ApiBase.php.
References getRequireOnlyOneParameterErrorMessages().
Referenced by ApiProtect\getPossibleErrors(), ApiDelete\getPossibleErrors(), ApiEditPage\getPossibleErrors(), and ApiQueryCategoryMembers\getPossibleErrors().
Returns the token salt if there is one, '' if the module doesn't require a salt, else false if the module doesn't need a token You have also to override needsToken() Value is passed to User::getEditToken.
Reimplemented in ApiUpload, ApiEditPage, ApiMove, ApiDelete, ApiBlock, ApiProtect, ApiFileRevert, ApiSetNotificationTimestamp, ApiImport, ApiUnblock, ApiOptions, ApiUndelete, ApiRollback, ApiEmailUser, ApiUserrights, ApiPatrol, and ApiWatch.
Definition at line 1472 of file ApiBase.php.
static ApiBase::getValidNamespaces | ( | ) | [static] |
Definition at line 823 of file ApiBase.php.
References wfDeprecated().
Referenced by getParameterFromSettings().
ApiBase::getVersion | ( | ) | [abstract] |
Returns a string that identifies the version of the extending class.
Typically includes the class name, the svn revision, timestamp, and last author. Usually done with SVN's Id keyword
Reimplemented in ApiMain, ApiQueryInfo, ApiPageSet, ApiQueryRevisions, ApiQuery, ApiQueryRecentChanges, ApiUpload, ApiQueryImageInfo, ApiQuerySiteinfo, ApiParse, ApiEditPage, ApiQueryBacklinks, ApiQueryContributions, ApiQueryLogEvents, ApiQueryWatchlist, ApiQueryAllUsers, ApiQueryDeletedrevs, ApiQueryCategoryMembers, ApiQueryBlocks, ApiQueryAllImages, ApiQueryUsers, ApiQueryFilearchive, ApiFormatFeedWrapper, ApiResult, ApiParamInfo, ApiQueryAllPages, ApiQuerySearch, ApiQueryUserInfo, ApiMove, ApiQueryAllMessages, ApiLogin, ApiSetNotificationTimestamp, ApiQueryCategories, ApiQueryExtLinksUsage, ApiDelete, ApiQueryProtectedTitles, ApiBlock, ApiQueryAllLinks, ApiQueryLinks, ApiFormatXml, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryAllCategories, ApiProtect, ApiFeedWatchlist, ApiQueryWatchlistRaw, ApiQueryDuplicateFiles, ApiQueryQueryPage, ApiRollback, ApiFeedContributions, ApiQueryImages, ApiQueryIWLinks, ApiFileRevert, ApiQueryTags, ApiQueryLangLinks, ApiImport, ApiPurge, ApiQueryRandom, ApiUnblock, ApiOptions, ApiFormatXmlRsd, ApiUndelete, ApiComparePages, ApiEmailUser, ApiQueryExternalLinks, ApiTokens, ApiRsd, MockApi, ApiHelp, ApiQueryCategoryInfo, ApiQueryPageProps, ApiUserrights, ApiQueryStashImageInfo, ApiWatch, ApiExpandTemplates, ApiOpenSearch, ApiPatrol, ApiFormatWddx, ApiFormatJson, ApiLogout, ApiFormatRaw, ApiDisabled, ApiQueryDisabled, ApiFormatDump, ApiFormatDbg, ApiFormatTxt, ApiFormatPhp, and ApiFormatYaml.
Referenced by makeHelpMsg().
ApiBase::getWatchlistUser | ( | $ | params | ) |
Gets the user for whom to get the watchlist.
$params | array |
Definition at line 1482 of file ApiBase.php.
References $params, $user, dieUsage(), ContextSource\getUser(), and User\newFromName().
Referenced by ApiQueryWatchlistRaw\run(), and ApiQueryWatchlist\run().
ApiBase::getWatchlistValue | ( | $ | watchlist, |
$ | titleObj, | ||
$ | userOption = null |
||
) | [protected] |
Return true if we're to watch the page, false if not, null if no change.
$watchlist | String Valid values: 'watch', 'unwatch', 'preferences', 'nochange' |
$titleObj | Title the page under consideration |
$userOption | String The user option to consider when $watchlist=preferences. If not set will magically default to either watchdefault or watchcreations |
Definition at line 836 of file ApiBase.php.
References ContextSource\getUser().
Referenced by ApiEditPage\execute(), and setWatch().
ApiBase::indentExampleText | ( | $ | item | ) | [private] |
ApiBase::isMain | ( | ) |
Returns true if this module is the main module ($this === $this->mMainModule), false otherwise.
Definition at line 162 of file ApiBase.php.
Referenced by __construct(), and getResult().
Indicates whether this module requires read rights.
Reimplemented in ApiMain, ApiParamInfo, ApiLogin, ApiHelp, ApiLogout, and ApiDisabled.
Definition at line 1435 of file ApiBase.php.
Referenced by getPossibleErrors(), and makeHelpMsg().
Indicates whether this module requires write mode.
Reimplemented in ApiUpload, ApiEditPage, ApiMove, ApiDelete, ApiSetNotificationTimestamp, ApiBlock, ApiProtect, ApiPurge, ApiFileRevert, ApiOptions, ApiImport, ApiUnblock, ApiUndelete, ApiEmailUser, ApiUserrights, ApiRollback, ApiWatch, and ApiPatrol.
Definition at line 1442 of file ApiBase.php.
Referenced by getPossibleErrors(), and makeHelpMsg().
ApiBase::makeHelpArrayToString | ( | $ | prefix, |
$ | title, | ||
$ | input | ||
) | [protected] |
$prefix | string Text to split output items |
$title | string What is being output |
$input | string|array |
Definition at line 338 of file ApiBase.php.
References $input, and $title.
Referenced by makeHelpMsg().
Generates help message for this module, or false if there is no description.
Reimplemented in ApiMain, and ApiQuery.
Definition at line 243 of file ApiBase.php.
References getExamples(), getFinalDescription(), getHelpUrls(), getMain(), getVersion(), isReadMode(), isWriteMode(), makeHelpArrayToString(), makeHelpMsgParameters(), and mustBePosted().
ApiBase::makeHelpMsg_callback | ( | $ | matches | ) |
Callback for preg_replace_callback() call in makeHelpMsg().
Replaces a source file name with a link to ViewVC
$matches | array |
Definition at line 496 of file ApiBase.php.
References $file, $matches, $path, $wgAutoloadClasses, and $wgAutoloadLocalClasses.
Generates the parameter descriptions for this module, to be displayed in the module's help.
Reimplemented in ApiQuery.
Definition at line 361 of file ApiBase.php.
References $params, $s, $t, encodeParamName(), getFinalParamDescription(), getFinalParams(), MWNamespace\getValidNamespaces(), PARAM_DFLT, PARAM_ISMULTI, and PARAM_TYPE.
Referenced by makeHelpMsg().
Indicates whether this module must be called with a POST request.
Reimplemented in ApiUpload, ApiEditPage, ApiMove, ApiLogin, ApiDelete, ApiSetNotificationTimestamp, ApiBlock, ApiProtect, ApiFileRevert, ApiOptions, ApiImport, ApiUnblock, ApiUndelete, ApiEmailUser, ApiUserrights, ApiRollback, ApiWatch, and ApiPatrol.
Definition at line 1450 of file ApiBase.php.
Referenced by getPossibleErrors(), and makeHelpMsg().
Returns whether this module requires a token to execute It is used to show possible errors in action=paraminfo see bug 25248.
Reimplemented in ApiUpload, ApiEditPage, ApiMove, ApiDelete, ApiBlock, ApiProtect, ApiFileRevert, ApiSetNotificationTimestamp, ApiImport, ApiUnblock, ApiOptions, ApiUndelete, ApiRollback, ApiEmailUser, ApiUserrights, ApiPatrol, and ApiWatch.
Definition at line 1460 of file ApiBase.php.
Referenced by getPossibleErrors().
ApiBase::parameterNotEmpty | ( | $ | x | ) | [private] |
Callback function used in requireOnlyOneParameter to check whether reequired parameters are set.
$x | object Parameter to check is not null/false |
Definition at line 814 of file ApiBase.php.
ApiBase::parseErrors | ( | $ | errors | ) |
Parses a list of errors into a standardised format.
$errors | array List of errors. Items can be in the for array( key, param1, param2, ... ) or array( 'code' => ..., 'info' => ... ) |
Definition at line 1550 of file ApiBase.php.
References parseMsg().
ApiBase::parseMsg | ( | $ | error | ) |
Return the error message related to a certain array.
$error | array Element of a getUserPermissionsErrors()-style array |
Definition at line 1392 of file ApiBase.php.
References wfMsgReplaceArgs().
Referenced by dieReadOnly(), dieUsageMsg(), ApiMove\execute(), ApiPurge\execute(), ApiMove\moveSubpages(), and parseErrors().
ApiBase::parseMultiValue | ( | $ | valueName, |
$ | value, | ||
$ | allowMultiple, | ||
$ | allowedValues | ||
) | [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.
$valueName | string The name of the parameter (for error reporting) |
$value | mixed The value being parsed |
$allowMultiple | bool Can $value contain more than one value separated by '|'? |
$allowedValues | mixed An array of values to check against. If null, all values are accepted. |
Definition at line 1063 of file ApiBase.php.
References $s, $value, dieUsage(), LIMIT_SML1, and setWarning().
Referenced by getParameterFromSettings().
Start module profiling.
Definition at line 1627 of file ApiBase.php.
References dieDebug(), getModuleProfileName(), and wfProfileIn().
Referenced by ApiQueryBase\checkRowCount(), ApiPageSet\getRedirectTargets(), ApiPageSet\initFromPageIds(), ApiPageSet\initFromRevIDs(), ApiPageSet\initFromTitles(), ApiPageSet\resolvePendingRedirects(), and ApiQueryBase\select().
End database profiling.
Definition at line 1641 of file ApiBase.php.
References dieDebug(), getMain(), getModuleProfileName(), and wfProfileOut().
Referenced by ApiQueryBase\checkRowCount(), ApiPageSet\getRedirectTargets(), ApiPageSet\initFromPageIds(), ApiPageSet\initFromRevIDs(), ApiPageSet\initFromTitles(), ApiPageSet\resolvePendingRedirects(), safeProfileOut(), and ApiQueryBase\select().
Start module profiling.
Definition at line 1571 of file ApiBase.php.
References dieDebug(), getModuleProfileName(), and wfProfileIn().
Referenced by ApiPageSet\execute(), ApiPageSet\finishPageSetGeneration(), ApiPageSet\populateFromPageIDs(), ApiPageSet\populateFromQueryResult(), ApiPageSet\populateFromRevisionIDs(), and ApiPageSet\populateFromTitles().
End module profiling.
Definition at line 1582 of file ApiBase.php.
References dieDebug(), getModuleProfileName(), and wfProfileOut().
Referenced by ApiPageSet\execute(), ApiPageSet\finishPageSetGeneration(), ApiPageSet\populateFromPageIDs(), ApiPageSet\populateFromQueryResult(), ApiPageSet\populateFromRevisionIDs(), ApiPageSet\populateFromTitles(), and safeProfileOut().
ApiBase::requireMaxOneParameter | ( | $ | params | ) |
Die if more than one of a certain set of parameters is set and not false.
$params | array |
Definition at line 733 of file ApiBase.php.
References $params, dieUsage(), and getModulePrefix().
Referenced by ApiSetNotificationTimestamp\execute(), and ApiQueryBlocks\execute().
ApiBase::requireOnlyOneParameter | ( | $ | params | ) |
Die if none or more than one of a certain set of parameters is set and not false.
$params | array of parameter names |
Definition at line 697 of file ApiBase.php.
References $params, dieUsage(), and getModulePrefix().
Referenced by ApiMove\execute(), and getTitleOrPageId().
When modules crash, sometimes it is needed to do a profileOut() regardless of the profiling state the module was in.
This method does such cleanup.
Definition at line 1599 of file ApiBase.php.
References profileDBOut(), and profileOut().
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
$warning | string Warning message |
Definition at line 208 of file ApiBase.php.
References $result, getModuleName(), getResult(), and ApiResult\setContent().
Referenced by ApiResult\addValue(), ApiFormatXml\addXslt(), ApiTokens\execute(), ApiPurge\execute(), ApiOptions\execute(), ApiQueryDisabled\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\execute(), ApiPageSet\execute(), ApiQueryInfo\extractPageInfo(), ApiQueryRecentChanges\extractRowInfo(), ApiQueryRevisions\extractRowInfo(), getParameterFromSettings(), ApiQueryImageInfo\mergeThumbParams(), parseMultiValue(), ApiQueryImages\run(), ApiQueryCategories\run(), ApiQueryLinks\run(), and warnOrDie().
ApiBase::setWatch | ( | $ | watch, |
$ | titleObj, | ||
$ | userOption = null |
||
) | [protected] |
Set a watch (or unwatch) based the based on a watchlist parameter.
$watch | String Valid values: 'watch', 'unwatch', 'preferences', 'nochange' |
$titleObj | Title the article's title to change |
$userOption | String The user option to consider when $watch=preferences |
Definition at line 874 of file ApiBase.php.
References $user, $value, WatchAction\doUnwatch(), WatchAction\doWatch(), ContextSource\getUser(), and getWatchlistValue().
Referenced by ApiProtect\execute(), ApiUndelete\execute(), ApiMove\execute(), ApiRollback\execute(), and ApiDelete\execute().
Indicates if this module needs maxlag to be checked.
Reimplemented in ApiQuery, and ApiHelp.
Definition at line 1427 of file ApiBase.php.
static ApiBase::truncateArray | ( | &$ | arr, |
$ | limit | ||
) | [static] |
Truncate an array to a certain length.
$arr | array Array to truncate |
$limit | int Maximum length |
Definition at line 1179 of file ApiBase.php.
References $limit.
ApiBase::validateLimit | ( | $ | paramName, |
&$ | value, | ||
$ | min, | ||
$ | max, | ||
$ | botMax = null , |
||
$ | enforceLimits = false |
||
) |
Validate the value against the minimum and user/bot maximum limits.
Prints usage info on failure.
$paramName | string Parameter name |
$value | int Parameter value |
$min | int|null Minimum value |
$max | int|null Maximum value for users |
$botMax | int Maximum value for sysops/bots |
$enforceLimits | Boolean Whether to enforce (die) if value is outside limits |
Definition at line 1116 of file ApiBase.php.
References $value, encodeParamName(), getMain(), and warnOrDie().
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryRevisions\execute(), and getParameterFromSettings().
ApiBase::validateTimestamp | ( | $ | value, |
$ | paramName | ||
) |
$value | string |
$paramName | string |
Definition at line 1151 of file ApiBase.php.
References $value, dieUsage(), and wfTimestamp().
Referenced by getParameterFromSettings().
ApiBase::warnOrDie | ( | $ | msg, |
$ | enforceLimits = false |
||
) | [private] |
Adds a warning to the output, else dies.
$msg | String Message to show as a warning, or error message if dying |
$enforceLimits | Boolean Whether this is an enforce (die) |
Definition at line 1165 of file ApiBase.php.
References dieUsage(), and setWarning().
Referenced by validateLimit().
ApiBase::$mDBTime = 0 |
Definition at line 1622 of file ApiBase.php.
ApiBase::$mDBTimeIn = 0 [private] |
Profiling: database execution time.
Definition at line 1622 of file ApiBase.php.
ApiBase::$messageMap [static] |
Array that maps message keys to error messages.
$1 and friends are replaced.
Definition at line 1208 of file ApiBase.php.
ApiBase::$mMainModule [private] |
Definition at line 69 of file ApiBase.php.
ApiBase::$mModuleName |
Definition at line 69 of file ApiBase.php.
ApiBase::$mModulePrefix |
Definition at line 69 of file ApiBase.php.
ApiBase::$mModuleTime = 0 |
Definition at line 1566 of file ApiBase.php.
ApiBase::$mParamCache = array() [private] |
Definition at line 70 of file ApiBase.php.
ApiBase::$mTimeIn = 0 [private] |
Profiling: total module execution time.
Definition at line 1566 of file ApiBase.php.
const ApiBase::LIMIT_BIG1 = 500 |
Definition at line 64 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryRevisions\execute(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), and ApiQueryRevisions\getAllowedParams().
const ApiBase::LIMIT_BIG2 = 5000 |
Definition at line 65 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryRevisions\execute(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), and ApiQueryRevisions\getAllowedParams().
const ApiBase::LIMIT_SML1 = 50 |
Definition at line 66 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryRevisions\execute(), ApiQuerySearch\getAllowedParams(), and parseMultiValue().
const ApiBase::LIMIT_SML2 = 500 |
Definition at line 67 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryRevisions\execute(), and ApiQuerySearch\getAllowedParams().
const ApiBase::PARAM_ALLOW_DUPLICATES = 6 |
Definition at line 52 of file ApiBase.php.
Referenced by ApiProtect\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), and getParameterFromSettings().
const ApiBase::PARAM_DEPRECATED = 7 |
Definition at line 53 of file ApiBase.php.
Referenced by ApiQueryStashImageInfo\getAllowedParams(), ApiUnblock\getAllowedParams(), ApiProtect\getAllowedParams(), ApiBlock\getAllowedParams(), ApiDelete\getAllowedParams(), ApiMove\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiUpload\getAllowedParams(), and getParameterFromSettings().
const ApiBase::PARAM_DFLT = 0 |
Definition at line 46 of file ApiBase.php.
Referenced by ApiQueryStashImageInfo\getAllowedParams(), ApiTokens\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiUnblock\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiFileRevert\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiProtect\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiBlock\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiDelete\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiMove\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryUserInfo\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiParse\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQuerySiteinfo\getAllowedParams(), ApiUpload\getAllowedParams(), ApiQueryInfo\getAllowedParams(), getParameterFromSettings(), and makeHelpMsgParameters().
const ApiBase::PARAM_ISMULTI = 1 |
Definition at line 47 of file ApiBase.php.
Referenced by ApiQueryStashImageInfo\getAllowedParams(), ApiTokens\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiOptions\getAllowedParams(), ApiHelp\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiProtect\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryUserInfo\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiParse\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQuerySiteinfo\getAllowedParams(), ApiQuery\getAllowedParams(), ApiQueryInfo\getAllowedParams(), ApiPageSet\getAllowedParams(), getParameterFromSettings(), and makeHelpMsgParameters().
const ApiBase::PARAM_MAX = 3 |
Definition at line 49 of file ApiBase.php.
Referenced by ApiOpenSearch\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), and getParameterFromSettings().
const ApiBase::PARAM_MAX2 = 4 |
Definition at line 50 of file ApiBase.php.
Referenced by ApiOpenSearch\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), and getParameterFromSettings().
const ApiBase::PARAM_MIN = 5 |
Definition at line 51 of file ApiBase.php.
Referenced by ApiOpenSearch\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), and getParameterFromSettings().
const ApiBase::PARAM_RANGE_ENFORCE = 9 |
const ApiBase::PARAM_REQUIRED = 8 |
Definition at line 55 of file ApiBase.php.
Referenced by ApiPatrol\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiWatch\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiEmailUser\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiImport\getAllowedParams(), ApiOptions\getAllowedParams(), ApiFileRevert\getAllowedParams(), ApiProtect\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiBlock\getAllowedParams(), ApiDelete\getAllowedParams(), ApiMove\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiUpload\getAllowedParams(), getParameterFromSettings(), and getPossibleErrors().
const ApiBase::PARAM_TYPE = 2 |
Definition at line 48 of file ApiBase.php.
Referenced by ApiPatrol\getAllowedParams(), ApiQueryStashImageInfo\getAllowedParams(), ApiTokens\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiWatch\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiEmailUser\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiComparePages\getAllowedParams(), ApiUnblock\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiImport\getAllowedParams(), ApiOptions\getAllowedParams(), ApiFileRevert\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiProtect\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiBlock\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiDelete\getAllowedParams(), ApiMove\getAllowedParams(), ApiSetNotificationTimestamp\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryUserInfo\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiParse\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQuerySiteinfo\getAllowedParams(), ApiUpload\getAllowedParams(), ApiQuery\getAllowedParams(), ApiQueryInfo\getAllowedParams(), ApiPageSet\getAllowedParams(), getParameterFromSettings(), and makeHelpMsgParameters().
const ApiBase::PROP_LIST = 'LIST' |
const ApiBase::PROP_NULLABLE = 1 |
Definition at line 62 of file ApiBase.php.
Referenced by addTokenProperties(), ApiTokens\getResultProperties(), ApiQueryCategoryInfo\getResultProperties(), ApiEmailUser\getResultProperties(), ApiUnblock\getResultProperties(), ApiComparePages\getResultProperties(), ApiPurge\getResultProperties(), ApiFileRevert\getResultProperties(), ApiQueryLangLinks\getResultProperties(), ApiQueryIWLinks\getResultProperties(), ApiQueryQueryPage\getResultProperties(), ApiBlock\getResultProperties(), ApiQueryWatchlistRaw\getResultProperties(), ApiLogin\getResultProperties(), ApiSetNotificationTimestamp\getResultProperties(), ApiQueryProtectedTitles\getResultProperties(), ApiMove\getResultProperties(), ApiQueryUserInfo\getResultProperties(), ApiQueryAllMessages\getResultProperties(), ApiQuerySearch\getResultProperties(), ApiQueryFilearchive\getResultProperties(), ApiQueryUsers\getResultProperties(), ApiQueryBlocks\getResultProperties(), ApiQueryAllUsers\getResultProperties(), ApiQueryWatchlist\getResultProperties(), ApiQueryLogEvents\getResultProperties(), ApiQueryContributions\getResultProperties(), ApiEditPage\getResultProperties(), ApiQueryRecentChanges\getResultProperties(), ApiUpload\getResultProperties(), ApiQueryRevisions\getResultProperties(), ApiQueryInfo\getResultProperties(), and ApiQueryImageInfo\getResultPropertiesFiltered().
const ApiBase::PROP_ROOT = 'ROOT' |
Definition at line 59 of file ApiBase.php.
Referenced by ApiQueryQueryPage\getResultProperties(), and ApiSetNotificationTimestamp\getResultProperties().
const ApiBase::PROP_TYPE = 0 |
Definition at line 61 of file ApiBase.php.
Referenced by addTokenProperties(), ApiTokens\getResultProperties(), ApiQueryCategoryInfo\getResultProperties(), ApiEmailUser\getResultProperties(), ApiUnblock\getResultProperties(), ApiOptions\getResultProperties(), ApiComparePages\getResultProperties(), ApiPurge\getResultProperties(), ApiFileRevert\getResultProperties(), ApiQueryLangLinks\getResultProperties(), ApiQueryIWLinks\getResultProperties(), ApiQueryQueryPage\getResultProperties(), ApiBlock\getResultProperties(), ApiQueryWatchlistRaw\getResultProperties(), ApiLogin\getResultProperties(), ApiSetNotificationTimestamp\getResultProperties(), ApiQueryProtectedTitles\getResultProperties(), ApiMove\getResultProperties(), ApiQueryUserInfo\getResultProperties(), ApiQueryAllMessages\getResultProperties(), ApiQuerySearch\getResultProperties(), ApiQueryFilearchive\getResultProperties(), ApiQueryUsers\getResultProperties(), ApiQueryBlocks\getResultProperties(), ApiQueryCategoryMembers\getResultProperties(), ApiQueryAllUsers\getResultProperties(), ApiQueryWatchlist\getResultProperties(), ApiQueryLogEvents\getResultProperties(), ApiQueryContributions\getResultProperties(), ApiEditPage\getResultProperties(), ApiQueryRecentChanges\getResultProperties(), ApiUpload\getResultProperties(), ApiQueryRevisions\getResultProperties(), ApiQueryInfo\getResultProperties(), and ApiQueryImageInfo\getResultPropertiesFiltered().