MediaWiki
1.23.5
|
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. More... | |
createContext () | |
Create a new RequestContext object to use e.g. More... | |
dieReadOnly () | |
Helper function for readonly errors. More... | |
dieStatus ( $status) | |
Throw a UsageException based on the errors in the Status object. 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... | |
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... | |
encodeParamName ( $paramName) | |
This method mangles parameter name based on the prefix supplied to the constructor. More... | |
execute () | |
Evaluates the parameters, performs the requested query, and sets up the result. 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... | |
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... | |
getErrorFromStatus ( $status) | |
Get error (as code, string) from a Status object. More... | |
getFinalDescription () | |
Get final module description, 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... | |
getFinalParams ( $flags=0) | |
Get final list of parameters, after hooks have had a chance to tweak it as needed. More... | |
getFinalPossibleErrors () | |
Get final list of possible errors, after hooks have had a chance to tweak it as needed. More... | |
getFinalResultProperties () | |
Get final possible result properties, after hooks have had a chance to tweak it as needed. More... | |
getHelpUrls () | |
getMain () | |
Get the main module. More... | |
getModuleManager () | |
Get the module manager, or null if this module has no sub-modules. More... | |
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... | |
getModuleProfileName ( $db=false) | |
Get the name of the module as shown in the profiler log. More... | |
getPossibleErrors () | |
Returns a list of all possible errors returned by the module. More... | |
getProfileDBTime () | |
Total time the module used the database. More... | |
getProfileTime () | |
Total time the module was executed. More... | |
getRequireAtLeastOneParameterErrorMessages ( $params) | |
Generates the possible errors requireAtLeastOneParameter() can die with. More... | |
getRequireMaxOneParameterErrorMessages ( $params) | |
Generates the possible error requireMaxOneParameter() can die with. More... | |
getRequireOnlyOneParameterErrorMessages ( $params) | |
Generates the possible errors requireOnlyOneParameter() can die with. More... | |
getResult () | |
Get the result object. More... | |
getResultData () | |
Get the result data array (read-only) More... | |
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. More... | |
getVersion () | |
Returns a string that identifies the version of the extending class. More... | |
getWatchlistUser ( $params) | |
Gets the user for whom to get the watchlist. More... | |
isMain () | |
Returns true if this module is the main module ($this === $this->mMainModule), false otherwise. More... | |
isReadMode () | |
Indicates whether this module requires read rights. More... | |
isWriteMode () | |
Indicates whether this module requires write mode. More... | |
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... | |
mustBePosted () | |
Indicates whether this module must be called with a POST request. More... | |
needsToken () | |
Returns whether this module requires a token to execute It is used to show possible errors in action=paraminfo see bug 25248. More... | |
parseErrors ( $errors) | |
Parses a list of errors into a standardised format. More... | |
parseMsg ( $error) | |
Return the error message related to a certain array. More... | |
profileDBIn () | |
Start module profiling. More... | |
profileDBOut () | |
End database profiling. More... | |
profileIn () | |
Start module profiling. More... | |
profileOut () | |
End module profiling. More... | |
requireAtLeastOneParameter ( $params) | |
Die if none of a certain set of parameters is set and not false. More... | |
requireMaxOneParameter ( $params) | |
Die if more than one of a certain set of parameters is set and not false. More... | |
requireOnlyOneParameter ( $params) | |
Die if none or more than one of a certain set of parameters is set and not false. More... | |
safeProfileOut () | |
When modules crash, sometimes it is needed to do a profileOut() regardless of the profiling state the module was in. More... | |
setWarning ( $warning) | |
Set warning section for this module. More... | |
shouldCheckMaxlag () | |
Indicates if this module needs maxlag to be checked. 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... | |
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 RequestContext object. More... | |
getLang () | |
Get the Language 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... | |
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... | |
Static Public Member Functions | |
static | debugPrint ( $value, $name='unknown', $backtrace=false) |
Debugging function that prints a value and an optional backtrace. More... | |
static | truncateArray (&$arr, $limit) |
Truncate an array to a certain length. More... | |
Public Attributes | |
$mDBTime = 0 | |
$mModuleName | |
$mModulePrefix | |
$mModuleTime = 0 | |
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 |
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. More... | |
Protected Member Functions | |
dieContinueUsageIf ( $condition) | |
Die with the $prefix. 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... | |
getDB () | |
Gets a default slave database connection object. More... | |
getDescription () | |
Returns the description string for this module. More... | |
getExamples () | |
Returns usage examples for this module. More... | |
getParamDescription () | |
Returns an array of parameter descriptions. More... | |
getParameter ( $paramName, $parseLimit=true) | |
Get a value for the given parameter. More... | |
getParameterFromSettings ( $paramName, $paramSettings, $parseLimit) | |
Using the settings determine the value for the given parameter. More... | |
getResultProperties () | |
Returns possible properties in the result, grouped by the value of the prop parameter that shows them. More... | |
getWatchlistValue ( $watchlist, $titleObj, $userOption=null) | |
Return true if we're to watch the page, false if not, null if no change. More... | |
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. More... | |
setWatch ( $watch, $titleObj, $userOption=null) | |
Set a watch (or unwatch) based the based on a watchlist parameter. More... | |
Static Protected Member Functions | |
static | addTokenProperties (&$props, $tokenFunctions) |
Add token properties to the array used by getResultProperties, based on a token functions mapping. More... | |
static | dieDebug ( $method, $message) |
Internal code errors should be reported with this method. More... | |
Private Member Functions | |
indentExampleText ( $item) | |
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... | |
warnOrDie ( $msg, $enforceLimits=false) | |
Adds a warning to the output, else dies. More... | |
Private Attributes | |
$mDBTimeIn = 0 | |
Profiling: database execution time. More... | |
$mMainModule | |
$mParamCache = array() | |
$mSlaveDB = null | |
$mTimeIn = 0 | |
Profiling: total module execution time. More... | |
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 | |
string | $moduleName | Name of this module |
string | $modulePrefix | Prefix to use for parameter names |
Reimplemented in ApiQueryImageInfo.
Definition at line 100 of file ApiBase.php.
References isMain(), and ContextSource\setContext().
|
staticprotected |
Add token properties to the array used by getResultProperties, based on a token functions mapping.
Definition at line 646 of file ApiBase.php.
Referenced by ApiTokens\getResultProperties(), ApiQueryUsers\getResultProperties(), ApiQueryRecentChanges\getResultProperties(), ApiQueryRevisions\getResultProperties(), and ApiQueryInfo\getResultProperties().
ApiBase::createContext | ( | ) |
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 232 of file ApiBase.php.
|
static |
Debugging function that prints a value and an optional backtrace.
$value | mixed Value to print | |
string | $name | Description of the printed value |
bool | $backtrace | If true, print a backtrace |
Definition at line 2328 of file ApiBase.php.
|
protected |
Die with the $prefix.
'badcontinue' error. This call is common enough to make it into the base method.
$condition | boolean will only die if this value is true |
Definition at line 1965 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryLangLinks\execute(), ApiQueryIWLinks\execute(), ApiQueryFilearchive\execute(), ApiQueryBlocks\execute(), ApiQueryLogEvents\execute(), ApiQueryPagePropNames\execute(), ApiQueryImageInfo\execute(), ApiQueryContributors\execute(), ApiQueryRevisions\execute(), ApiQueryInfo\execute(), ApiQuery\initContinue(), ApiQuery\initModules(), ApiQueryContributions\prepareQuery(), ApiQueryIWBacklinks\run(), ApiQueryLangBacklinks\run(), ApiQueryProtectedTitles\run(), ApiQueryRedirects\run(), ApiQueryImages\run(), ApiQueryWatchlistRaw\run(), ApiQueryCategories\run(), ApiQueryDuplicateFiles\run(), ApiQueryCategoryMembers\run(), ApiQueryAllCategories\run(), ApiQueryPagesWithProp\run(), ApiQueryWatchlist\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryLinks\run(), ApiQueryAllLinks\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 |
Definition at line 2006 of file ApiBase.php.
Referenced by ApiQueryLinks\__construct(), ApiQueryAllLinks\__construct(), ApiQueryBase\addJoinConds(), ApiQueryBase\addTables(), ApiQueryAllUsers\execute(), ApiLogin\execute(), ApiFormatRaw\execute(), ApiQueryRevisions\execute(), ApiFormatFeedWrapper\execute(), ApiResult\execute(), ApiQueryBacklinks\getDescription(), ApiFormatRaw\getMimeType(), ApiPageSet\initFromQueryResult(), ApiQuery\instantiateModules(), ApiQueryWatchlist\parseRCType(), ApiQueryRecentChanges\parseRCType(), ApiResult\setContent(), ApiResult\setElement(), ApiQueryGeneratorBase\setGeneratorMode(), and ApiResult\setIndexedTagName().
ApiBase::dieReadOnly | ( | ) |
Helper function for readonly errors.
Definition at line 1919 of file ApiBase.php.
Referenced by ApiMain\checkExecutePermissions(), and ApiEditPage\execute().
ApiBase::dieStatus | ( | $status | ) |
Throw a UsageException based on the errors in the Status object.
MWException |
Definition at line 1419 of file ApiBase.php.
Referenced by ApiCreateAccount\execute(), ApiProtect\execute(), ApiImport\execute(), ApiDelete\execute(), ApiUserrights\getUrUser(), 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 | $extradata | Data to add to the "<error>" element; array in ApiResult format |
UsageException |
Definition at line 1363 of file ApiBase.php.
Referenced by ApiMain\checkAsserts(), ApiUpload\checkAsyncDownloadEnabled(), ApiMain\checkMaxLag(), ApiUpload\checkVerification(), ApiMain\createPrinterByName(), ApiUpload\dieRecoverableError(), ApiComparePages\execute(), ApiCreateAccount\execute(), ApiQueryStashImageInfo\execute(), ApiRevisionDelete\execute(), ApiEditPage\execute(), ApiUpload\execute(), ApiWatch\execute(), ApiHelp\execute(), ApiParse\execute(), ApiPatrol\execute(), ApiSetNotificationTimestamp\execute(), ApiOptions\execute(), ApiQueryDeletedrevs\execute(), ApiQueryAllMessages\execute(), ApiDisabled\execute(), ApiQueryFilearchive\execute(), ApiFeedContributions\execute(), ApiFeedRecentChanges\execute(), ApiQueryBlocks\execute(), ApiQueryLogEvents\execute(), ApiQueryContributions\execute(), ApiQueryAllUsers\execute(), ApiFeedWatchlist\execute(), ApiQueryRevisions\execute(), ApiQueryAllPages\executeGenerator(), ApiQueryAllImages\executeGenerator(), ApiPageSet\executeInternal(), ApiQueryRevisions\extractRowInfo(), ApiUpload\getChunkResult(), ApiParse\getParsedContent(), ApiQueryImageInfo\getScale(), ApiParse\getSectionContent(), ApiUpload\getStashResult(), ApiQueryImageInfo\mergeThumbParams(), ApiUpload\performUpload(), ApiQueryContributions\prepareQuery(), ApiQueryBase\prepareUrlQuerySearchString(), ApiQueryContributions\prepareUsername(), ApiQueryBlocks\prepareUsername(), ApiComparePages\revisionOrTitleOrId(), ApiQueryCategoryMembers\run(), ApiQueryWatchlist\run(), ApiQuerySearch\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryAllLinks\run(), ApiQueryRecentChanges\run(), ApiUpload\selectUploadModule(), ApiMain\setupExecuteAction(), and ApiMain\setupModule().
ApiBase::dieUsageMsg | ( | $error | ) |
Output the error message related to a certain array.
$error | (array|string) Element of a getUserPermissionsErrors()-style array |
Definition at line 1929 of file ApiBase.php.
Referenced by ApiMain\checkExecutePermissions(), ApiFileRevert\checkPermissions(), ApiUpload\checkPermissions(), ApiProtect\execute(), ApiCreateAccount\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiMove\execute(), ApiRevisionDelete\execute(), ApiImport\execute(), ApiEditPage\execute(), ApiUpload\execute(), ApiWatch\execute(), ApiParse\execute(), ApiPatrol\execute(), ApiExpandTemplates\execute(), ApiOptions\execute(), ApiQueryAllMessages\execute(), ApiUnblock\execute(), ApiQueryLangLinks\execute(), ApiQueryIWLinks\execute(), ApiRollback\execute(), ApiDelete\execute(), ApiBlock\execute(), ApiQueryBlocks\execute(), ApiQueryRevisions\execute(), ApiFeedRecentChanges\getFeedObject(), ApiRollback\getRbTitle(), ApiRollback\getRbUser(), ApiQueryBase\keyToTitle(), ApiQueryContributions\prepareQuery(), ApiComparePages\revisionOrTitleOrId(), ApiQueryIWBacklinks\run(), ApiQueryLangBacklinks\run(), ApiQueryRedirects\run(), ApiQueryWatchlistRaw\run(), ApiQueryCategories\run(), ApiQueryWatchlist\run(), ApiQueryQueryPage\run(), ApiQueryRecentChanges\run(), ApiUpload\selectUploadModule(), ApiMain\setupModule(), ApiQueryBase\titlePartToKey(), ApiQueryBase\titleToKey(), 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().
$error | (array|string) Element of a getUserPermissionsErrors()-style array |
Definition at line 1945 of file ApiBase.php.
Referenced by ApiQuery\initModules(), and ApiMain\setupExternalResponse().
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 |
Reimplemented in ApiQueryGeneratorBase.
Definition at line 674 of file ApiBase.php.
Referenced by ApiQueryLogEvents\execute(), and ApiQueryBase\setContinueEnumParameter().
|
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 ApiResult, ApiFormatFeedWrapper, ApiMain, ApiQueryInfo, ApiQuery, ApiPageSet, ApiQueryRecentChanges, ApiQueryAllLinks, ApiQueryBacklinks, ApiQueryRevisions, ApiQueryORM, ApiQueryUsers, ApiQueryLinks, ApiFormatJson, ApiFormatRaw, ApiFeedWatchlist, ApiQueryAllImages, ApiImageRotate, ApiLogin, ApiOpenSearch, ApiQueryAllUsers, ApiQueryContributors, ApiQueryQueryPage, ApiQueryImageInfo, ApiQuerySearch, ApiQueryTags, ApiQueryFileRepoInfo, ApiQueryLogEvents, ApiQueryPagePropNames, ApiQueryContributions, ApiFeedRecentChanges, ApiQueryBlocks, ApiBlock, ApiDelete, ApiFeedContributions, ApiParamInfo, ApiFormatDbg, ApiFormatDump, ApiFormatTxt, ApiQueryFilearchive, ApiQueryPageProps, ApiQueryRandom, ApiQueryUserInfo, ApiRollback, ApiDisabled, ApiQueryAllCategories, ApiQueryCategoryInfo, ApiQueryDisabled, ApiQueryImages, ApiQueryIWLinks, ApiQueryPagesWithProp, ApiQueryRedirects, ApiQueryWatchlist, ApiQueryWatchlistRaw, ApiPurge, ApiQueryAllMessages, ApiQueryAllPages, ApiQueryCategories, ApiQueryCategoryMembers, ApiQueryDeletedrevs, ApiQueryDuplicateFiles, ApiQueryExternalLinks, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryLangLinks, ApiQueryProtectedTitles, ApiUnblock, ApiFileRevert, ApiFormatNone, ApiFormatPhp, ApiOptions, ApiExpandTemplates, ApiHelp, ApiParse, ApiPatrol, ApiQueryExtLinksUsage, ApiSetNotificationTimestamp, ApiEditPage, ApiLogout, ApiUpload, ApiUserrights, ApiWatch, ApiImport, ApiQueryStashImageInfo, ApiRevisionDelete, ApiRsd, ApiEmailUser, ApiMove, ApiTokens, ApiUndelete, ApiCreateAccount, ApiProtect, ApiQueryPrefixSearch, ApiComparePages, MockApi, and MockApiQueryBase.
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 687 of file ApiBase.php.
Referenced by ApiPageSet\__construct(), ApiComparePages\execute(), ApiCreateAccount\execute(), ApiProtect\execute(), ApiTokens\execute(), ApiUndelete\execute(), ApiMove\execute(), ApiEmailUser\execute(), ApiImport\execute(), ApiQueryStashImageInfo\execute(), ApiRevisionDelete\execute(), ApiEditPage\execute(), ApiUpload\execute(), ApiUserrights\execute(), ApiWatch\execute(), ApiSetNotificationTimestamp\execute(), ApiParse\execute(), ApiPatrol\execute(), ApiExpandTemplates\execute(), ApiHelp\execute(), ApiFileRevert\execute(), ApiOptions\execute(), ApiQueryAllMessages\execute(), ApiQueryDeletedrevs\execute(), ApiUnblock\execute(), ApiQueryExternalLinks\execute(), ApiQueryLangLinks\execute(), ApiPurge\execute(), ApiQueryCategoryInfo\execute(), ApiQueryIWLinks\execute(), ApiQueryUserInfo\execute(), ApiRollback\execute(), ApiQueryFilearchive\execute(), ApiQueryPageProps\execute(), ApiDelete\execute(), ApiFeedContributions\execute(), ApiBlock\execute(), ApiParamInfo\execute(), ApiQueryBlocks\execute(), ApiFeedRecentChanges\execute(), ApiQueryContributions\execute(), ApiQueryFileRepoInfo\execute(), ApiQueryLogEvents\execute(), ApiQueryPagePropNames\execute(), ApiQueryTags\execute(), ApiQueryImageInfo\execute(), ApiQueryAllUsers\execute(), ApiOpenSearch\execute(), ApiQueryContributors\execute(), ApiLogin\execute(), ApiImageRotate\execute(), ApiFeedWatchlist\execute(), ApiFormatJson\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\execute(), ApiQuery\execute(), ApiQueryInfo\execute(), ApiOpenSearch\getCustomPrinter(), ApiFormatJson\getMimeType(), ApiQueryORM\getParams(), ApiRollback\getRbTitle(), ApiRollback\getRbUser(), ApiUserrights\getUrUser(), ApiQueryPrefixSearch\run(), ApiQueryImages\run(), ApiQueryRedirects\run(), ApiQueryLangBacklinks\run(), ApiQueryIWBacklinks\run(), ApiQueryProtectedTitles\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryCategories\run(), ApiQueryDuplicateFiles\run(), ApiQueryAllCategories\run(), ApiQueryCategoryMembers\run(), ApiQueryPagesWithProp\run(), ApiQueryWatchlist\run(), ApiQuerySearch\run(), ApiQueryQueryPage\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryLinks\run(), ApiQueryRandom\run(), ApiQueryAllLinks\run(), ApiQueryRecentChanges\run(), ApiQueryBacklinks\run(), 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.
Reimplemented in ApiMain, ApiQueryInfo, ApiQueryRevisions, ApiUpload, ApiParse, ApiQueryRecentChanges, ApiQueryImageInfo, ApiEditPage, ApiQueryWatchlist, ApiQueryContributions, ApiQueryBacklinks, ApiQueryDeletedrevs, ApiQueryAllUsers, ApiParamInfo, ApiQueryAllImages, ApiQueryUsers, ApiQueryBlocks, ApiQueryCategoryMembers, ApiQueryAllLinks, ApiQuerySearch, ApiQueryFilearchive, ApiQueryORM, ApiQueryAllPages, ApiQueryContributors, ApiQueryRedirects, ApiQueryAllMessages, ApiQueryUserInfo, ApiQueryLinks, ApiMove, ApiCreateAccount, ApiDelete, ApiQueryCategories, ApiLogin, ApiQueryProtectedTitles, ApiRevisionDelete, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiFeedContributions, ApiQueryDuplicateFiles, ApiQueryAllCategories, ApiQueryRandom, ApiBlock, ApiQueryExtLinksUsage, ApiQueryQueryPage, ApiProtect, ApiQueryImages, ApiQueryIWLinks, ApiQueryLangLinks, ApiQueryTags, ApiHelp, ApiOptions, ApiQueryWatchlistRaw, ApiQueryPagesWithProp, ApiQueryPageProps, ApiFileRevert, ApiFeedRecentChanges, ApiComparePages, ApiQueryExternalLinks, ApiQueryCategoryInfo, ApiImport, ApiUndelete, ApiUserrights, ApiEmailUser, ApiUnblock, ApiQueryPagePropNames, ApiRollback, ApiQueryPrefixSearch, ApiExpandTemplates, ApiPatrol, ApiQueryStashImageInfo, ApiFormatJson, ApiTokens, ApiOpenSearch, ApiQueryFileRepoInfo, ApiRsd, ApiLogout, ApiDisabled, ApiQueryDisabled, and MockApi.
Definition at line 565 of file ApiBase.php.
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.
Reimplemented in ApiQuery, ApiRsd, ApiFeedWatchlist, ApiFeedContributions, ApiOpenSearch, and ApiFeedRecentChanges.
Definition at line 278 of file ApiBase.php.
|
protected |
Gets a default slave database connection object.
Reimplemented in ApiPageSet, ApiQueryBase, and ApiQueryAllImages.
Definition at line 2312 of file ApiBase.php.
Referenced by ApiQuery\doExport(), ApiProtect\execute(), ApiBlock\execute(), and ApiParse\formatCategoryLinks().
|
protected |
Returns the description string for this module.
Reimplemented in ApiMain, ApiQueryInfo, ApiQueryRecentChanges, ApiQueryImageInfo, ApiQueryRevisions, ApiParse, ApiUpload, ApiQuery, ApiQueryWatchlist, ApiQueryContributions, ApiQueryLogEvents, ApiQueryBacklinks, ApiQueryDeletedrevs, ApiEditPage, ApiQueryAllUsers, ApiQueryBlocks, ApiQueryCategoryMembers, ApiQuerySearch, ApiQueryAllImages, ApiQueryUsers, ApiQueryFilearchive, ApiParamInfo, ApiQueryAllLinks, ApiQueryAllPages, ApiFormatBase, ApiQueryUserInfo, ApiQueryAllMessages, ApiQueryProtectedTitles, ApiQueryContributors, ApiMove, ApiSetNotificationTimestamp, ApiFeedWatchlist, ApiQueryExtLinksUsage, ApiLogin, ApiQueryCategories, ApiQueryRedirects, ApiDelete, ApiQueryLinks, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryAllCategories, ApiBlock, ApiRevisionDelete, ApiQueryLangLinks, ApiProtect, ApiWatch, ApiFeedContributions, ApiQueryWatchlistRaw, ApiImageRotate, ApiQueryDuplicateFiles, ApiQueryQueryPage, ApiFeedRecentChanges, ApiQueryTags, ApiOptions, ApiQueryIWLinks, ApiQueryRandom, ApiPurge, ApiQueryImages, ApiQueryPagesWithProp, ApiCreateAccount, ApiFileRevert, ApiComparePages, ApiHelp, ApiQueryExternalLinks, ApiImport, ApiQueryCategoryInfo, ApiQueryPageProps, ApiUndelete, ApiRollback, ApiUnblock, ApiEmailUser, ApiQueryStashImageInfo, ApiUserrights, ApiPatrol, ApiQueryPrefixSearch, ApiExpandTemplates, ApiOpenSearch, ApiQueryFileRepoInfo, ApiQueryPagePropNames, ApiTokens, ApiFormatJson, ApiRsd, ApiLogout, ApiDisabled, ApiQueryDisabled, ApiFormatDump, ApiFormatDbg, ApiFormatTxt, ApiFormatPhp, ApiFormatNone, and ApiFormatYaml.
Definition at line 541 of file ApiBase.php.
ApiBase::getErrorFromStatus | ( | $status | ) |
Get error (as code, string) from a Status object.
Definition at line 1380 of file ApiBase.php.
Referenced by ApiWatch\watchTitle().
|
protected |
Returns usage examples for this module.
Return false if no examples are available.
Reimplemented in ApiQueryRevisions, ApiQueryRecentChanges, ApiQueryInfo, ApiQueryImageInfo, ApiUpload, ApiParse, ApiQuery, ApiQueryWatchlist, ApiEditPage, ApiQueryContributions, ApiQueryLogEvents, ApiQueryBacklinks, ApiQueryDeletedrevs, ApiQueryAllImages, ApiQueryAllUsers, ApiQueryBlocks, ApiQueryCategoryMembers, ApiQuerySearch, ApiQueryUsers, ApiQueryFilearchive, ApiQueryAllLinks, ApiQueryAllPages, ApiParamInfo, ApiFormatBase, ApiCreateAccount, ApiQueryUserInfo, ApiMove, ApiSetNotificationTimestamp, ApiLogin, ApiQueryAllMessages, ApiQueryProtectedTitles, ApiQueryContributors, ApiFeedWatchlist, ApiQueryExtLinksUsage, ApiDelete, ApiQueryCategories, ApiQueryRedirects, ApiBlock, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiProtect, ApiRevisionDelete, ApiQueryLinks, ApiQueryAllCategories, ApiQueryLangLinks, ApiImageRotate, ApiWatch, ApiQueryWatchlistRaw, ApiFeedContributions, ApiOptions, ApiQueryQueryPage, ApiFeedRecentChanges, ApiQueryDuplicateFiles, ApiRollback, ApiQueryRandom, ApiQueryIWLinks, ApiPurge, ApiQueryTags, ApiFileRevert, ApiQueryImages, ApiQueryPagesWithProp, ApiComparePages, ApiImport, ApiUndelete, ApiQueryExternalLinks, ApiHelp, ApiUnblock, ApiEmailUser, ApiQueryCategoryInfo, ApiQueryPageProps, ApiPatrol, ApiUserrights, ApiQueryStashImageInfo, ApiExpandTemplates, ApiQueryPrefixSearch, ApiOpenSearch, ApiQueryFileRepoInfo, ApiQueryPagePropNames, ApiTokens, ApiRsd, ApiLogout, ApiDisabled, and ApiQueryDisabled.
Definition at line 549 of file ApiBase.php.
ApiBase::getFinalDescription | ( | ) |
Get final module description, after hooks have had a chance to tweak it as needed.
Definition at line 661 of file ApiBase.php.
ApiBase::getFinalParamDescription | ( | ) |
Get final parameter descriptions, after hooks have had a chance to tweak it as needed.
Definition at line 602 of file ApiBase.php.
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 589 of file ApiBase.php.
ApiBase::getFinalPossibleErrors | ( | ) |
Get final list of possible errors, after hooks have had a chance to tweak it as needed.
Definition at line 2167 of file ApiBase.php.
Referenced by ApiPurge\getPossibleErrors(), and ApiQuery\getPossibleErrors().
ApiBase::getFinalResultProperties | ( | ) |
Get final possible result properties, after hooks have had a chance to tweak it as needed.
Definition at line 635 of file ApiBase.php.
ApiBase::getHelpUrls | ( | ) |
Reimplemented in ApiQueryRevisions, ApiQueryRecentChanges, ApiQueryInfo, ApiQueryImageInfo, ApiUpload, ApiParse, ApiQuery, ApiEditPage, ApiQueryWatchlist, ApiQueryContributions, ApiQueryLogEvents, ApiQueryBacklinks, ApiQueryDeletedrevs, ApiQueryAllImages, ApiQueryAllUsers, ApiQueryBlocks, ApiQueryCategoryMembers, ApiQuerySearch, ApiQueryFilearchive, ApiQueryUsers, ApiQueryAllLinks, ApiQueryAllPages, ApiParamInfo, ApiFormatBase, ApiCreateAccount, ApiQueryUserInfo, ApiSetNotificationTimestamp, ApiMove, ApiLogin, ApiQueryAllMessages, ApiQueryProtectedTitles, ApiQueryContributors, ApiFeedWatchlist, ApiDelete, ApiQueryCategories, ApiQueryExtLinksUsage, ApiQueryRedirects, ApiBlock, ApiQueryLinks, ApiRevisionDelete, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiProtect, ApiQueryAllCategories, ApiQueryLangLinks, ApiWatch, ApiQueryWatchlistRaw, ApiQueryQueryPage, ApiQueryDuplicateFiles, ApiOptions, ApiRollback, ApiQueryIWLinks, ApiPurge, ApiQueryRandom, ApiQueryTags, ApiQueryImages, ApiQueryPagesWithProp, ApiImport, ApiUndelete, ApiHelp, ApiQueryExternalLinks, ApiUnblock, ApiEmailUser, ApiQueryCategoryInfo, ApiQueryPageProps, ApiPatrol, ApiUserrights, ApiExpandTemplates, ApiQueryPrefixSearch, ApiOpenSearch, ApiQueryPagePropNames, and ApiLogout.
Definition at line 2100 of file ApiBase.php.
ApiBase::getMain | ( | ) |
Get the main module.
Definition at line 188 of file ApiBase.php.
Referenced by ApiParamInfo\__construct(), ApiPageSet\__construct(), ApiParamInfo\addModulesInfo(), ApiCreateAccount\execute(), ApiUpload\execute(), ApiExpandTemplates\execute(), ApiHelp\execute(), ApiParse\execute(), ApiQueryDeletedrevs\execute(), ApiParamInfo\execute(), ApiFeedRecentChanges\execute(), ApiOpenSearch\execute(), ApiLogin\execute(), ApiFeedWatchlist\execute(), ApiQueryRevisions\execute(), ApiQuery\execute(), ApiPageSet\executeInternal(), ApiParamInfo\getAllowedParams(), ApiUpload\getChunkResult(), ApiParamInfo\getClassInfo(), ApiQueryUserInfo\getCurrentUserInfo(), ApiFeedRecentChanges\getCustomPrinter(), ApiOpenSearch\getCustomPrinter(), ApiFeedContributions\getCustomPrinter(), ApiFeedWatchlist\getCustomPrinter(), ApiRsd\getCustomPrinter(), ApiQuery\getCustomPrinter(), ApiPageSet\getGenerators(), ApiQueryUsers\getTokenFunctions(), ApiQueryRevisions\getTokenFunctions(), ApiQueryRecentChanges\getTokenFunctions(), ApiQueryInfo\getTokenFunctions(), ApiTokens\getTokenTypes(), ApiFeedWatchlist\getWatchlistModule(), ApiFormatBase\initPrinter(), ApiQueryBacklinks\run(), and ApiUpload\selectUploadModule().
ApiBase::getModuleManager | ( | ) |
Get the module manager, or null if this module has no sub-modules.
Reimplemented in ApiMain, and ApiQuery.
Definition at line 157 of file ApiBase.php.
ApiBase::getModuleName | ( | ) |
Get the name of the module being executed by this instance.
Definition at line 148 of file ApiBase.php.
Referenced by ApiPageSet\__construct(), ApiQueryBase\addPageSubItem(), ApiQueryBase\addPageSubItems(), ApiQueryTags\doTag(), ApiComparePages\execute(), ApiProtect\execute(), ApiTokens\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiMove\execute(), ApiImport\execute(), ApiQueryStashImageInfo\execute(), ApiRevisionDelete\execute(), ApiUpload\execute(), ApiUserrights\execute(), ApiWatch\execute(), ApiEditPage\execute(), ApiParse\execute(), ApiHelp\execute(), ApiPatrol\execute(), ApiExpandTemplates\execute(), ApiSetNotificationTimestamp\execute(), ApiOptions\execute(), ApiFileRevert\execute(), ApiUnblock\execute(), ApiQueryDeletedrevs\execute(), ApiPurge\execute(), ApiQueryAllMessages\execute(), ApiQueryFilearchive\execute(), ApiRollback\execute(), ApiQueryUserInfo\execute(), ApiParamInfo\execute(), ApiBlock\execute(), ApiDelete\execute(), ApiQueryBlocks\execute(), ApiQueryContributions\execute(), ApiQueryLogEvents\execute(), ApiQueryPagePropNames\execute(), ApiQueryTags\execute(), ApiQueryAllUsers\execute(), ApiImageRotate\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\execute(), ApiQueryLinks\getExamples(), ApiFormatBase\getExamples(), ApiQueryAllLinks\getExamples(), ApiQueryAllLinks\getHelpUrls(), ApiQueryAllLinks\getPossibleErrors(), ApiMain\makeHelpMsg(), ApiQueryPrefixSearch\run(), ApiQueryLangBacklinks\run(), ApiQueryIWBacklinks\run(), ApiQueryProtectedTitles\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryAllCategories\run(), ApiQueryCategoryMembers\run(), ApiQueryPagesWithProp\run(), ApiQueryWatchlist\run(), ApiQueryQueryPage\run(), ApiQuerySearch\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryRandom\run(), ApiQueryAllLinks\run(), ApiQueryRecentChanges\run(), ApiQueryBacklinks\run(), ApiQueryRandom\runQuery(), ApiUpload\selectUploadModule(), and ApiQueryBase\setContinueEnumParameter().
ApiBase::getModulePrefix | ( | ) |
Get parameter prefix (usually two letters or an empty string).
Definition at line 165 of file ApiBase.php.
Referenced by ApiQueryBase\addPageSubItem(), ApiQueryBase\addPageSubItems(), ApiQueryStashImageInfo\execute(), ApiWatch\execute(), ApiQueryDeletedrevs\getDescription(), ApiParse\getDescription(), ApiQueryAllLinks\getExamples(), ApiUnblock\getParamDescription(), ApiQueryStashImageInfo\getParamDescription(), ApiQueryExternalLinks\getParamDescription(), ApiProtect\getParamDescription(), ApiCreateAccount\getParamDescription(), ApiQueryExtLinksUsage\getParamDescription(), ApiDelete\getParamDescription(), ApiMove\getParamDescription(), ApiQueryProtectedTitles\getParamDescription(), ApiQueryAllPages\getParamDescription(), ApiQueryAllLinks\getParamDescription(), ApiQueryBlocks\getParamDescription(), ApiQueryCategoryMembers\getParamDescription(), ApiQueryAllImages\getParamDescription(), ApiQueryDeletedrevs\getParamDescription(), ApiQueryContributions\getParamDescription(), ApiQueryLogEvents\getParamDescription(), ApiQueryWatchlist\getParamDescription(), ApiEditPage\getParamDescription(), ApiQueryImageInfo\getParamDescription(), ApiQueryRecentChanges\getParamDescription(), ApiParse\getParamDescription(), ApiQueryRevisions\getParamDescription(), ApiQueryAllImages\getPossibleErrors(), ApiQueryImageInfo\getPossibleErrors(), ApiQueryImageInfo\getScale(), ApiQueryImageInfo\mergeThumbParams(), ApiQueryPrefixSearch\run(), ApiQueryProtectedTitles\run(), ApiQueryExtLinksUsage\run(), ApiQueryAllImages\run(), and ApiQueryAllLinks\run().
ApiBase::getModuleProfileName | ( | $db = false | ) |
Get the name of the module as shown in the profiler log.
$db | DatabaseBase|bool |
Definition at line 176 of file ApiBase.php.
|
protected |
Returns an array of parameter descriptions.
Don't call this function directly: use getFinalParamDescription() to allow hooks to modify descriptions as needed.
Reimplemented in ApiPageSet, ApiMain, ApiQueryInfo, ApiQueryRevisions, ApiUpload, ApiParse, ApiQueryRecentChanges, ApiQuery, ApiQueryImageInfo, ApiEditPage, ApiQueryWatchlist, ApiQueryLogEvents, ApiQueryContributions, ApiQueryBacklinks, ApiQueryDeletedrevs, ApiQueryAllUsers, ApiQueryAllImages, ApiQueryCategoryMembers, ApiParamInfo, ApiQueryBlocks, ApiQuerySearch, ApiQueryAllLinks, ApiQueryUsers, ApiQueryAllPages, ApiQueryFilearchive, ApiQueryORM, ApiFeedWatchlist, ApiQueryContributors, ApiQueryAllMessages, ApiQueryRedirects, ApiQueryProtectedTitles, ApiMove, ApiSetNotificationTimestamp, ApiQueryUserInfo, ApiQueryCategories, ApiDelete, ApiQueryLinks, ApiQueryExtLinksUsage, ApiCreateAccount, ApiRevisionDelete, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiImageRotate, ApiFeedContributions, ApiQueryAllCategories, ApiWatch, ApiLogin, ApiQueryDuplicateFiles, ApiProtect, ApiQueryLangLinks, ApiQueryWatchlistRaw, ApiFeedRecentChanges, ApiOptions, ApiBlock, ApiQueryRandom, ApiQueryImages, ApiQueryIWLinks, ApiQueryPagesWithProp, ApiQueryQueryPage, ApiQueryTags, ApiHelp, ApiPurge, ApiFileRevert, ApiQueryPageProps, ApiComparePages, ApiQueryExternalLinks, ApiImport, ApiUndelete, ApiUserrights, ApiQueryStashImageInfo, ApiRollback, ApiQueryCategoryInfo, ApiEmailUser, ApiQueryPrefixSearch, ApiOpenSearch, ApiQueryPagePropNames, ApiUnblock, ApiTokens, ApiExpandTemplates, ApiPatrol, ApiQueryFileRepoInfo, ApiFormatJson, ApiRsd, ApiLogout, ApiDisabled, and ApiQueryDisabled.
Definition at line 577 of file ApiBase.php.
|
protected |
Get a value for the given parameter.
string | $paramName | Parameter name |
bool | $parseLimit | see extractRequestParams() |
Definition at line 711 of file ApiBase.php.
Referenced by ApiFeedRecentChanges\execute(), ApiQuery\getCustomPrinter(), ApiMain\handleCORS(), ApiMain\sendCacheHeaders(), 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. |
$parseLimit | Boolean: parse limit? |
Definition at line 970 of file ApiBase.php.
ApiBase::getPossibleErrors | ( | ) |
Returns a list of all possible errors returned by the module.
Don't call this function directly: use getFinalPossibleErrors() to allow hooks to modify parameters as needed.
Reimplemented in ApiMain, ApiPageSet, ApiQueryRecentChanges, ApiQueryRevisions, ApiQueryImageInfo, ApiParse, ApiUpload, ApiQuery, ApiQueryWatchlist, ApiQueryContributions, ApiQueryLogEvents, ApiQueryBase, ApiQueryBacklinks, ApiQueryDeletedrevs, ApiEditPage, ApiQueryAllUsers, ApiQueryBlocks, ApiQueryCategoryMembers, ApiQuerySearch, ApiQueryAllImages, ApiQueryFilearchive, ApiQueryAllLinks, ApiQueryAllPages, ApiSetNotificationTimestamp, ApiMove, ApiFeedWatchlist, ApiQueryContributors, ApiLogin, ApiQueryExtLinksUsage, ApiQueryAllMessages, ApiQueryCategories, ApiCreateAccount, ApiDelete, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiBlock, ApiRevisionDelete, ApiQueryLangLinks, ApiProtect, ApiImageRotate, ApiWatch, ApiFeedContributions, ApiQueryWatchlistRaw, ApiQueryQueryPage, ApiFeedRecentChanges, ApiOptions, ApiQueryIWLinks, ApiPurge, ApiFileRevert, ApiComparePages, ApiImport, ApiQueryExternalLinks, ApiUndelete, ApiRollback, ApiUnblock, ApiEmailUser, ApiPatrol, and ApiExpandTemplates.
Definition at line 2113 of file ApiBase.php.
ApiBase::getProfileDBTime | ( | ) |
ApiBase::getProfileTime | ( | ) |
ApiBase::getRequireAtLeastOneParameterErrorMessages | ( | $params | ) |
Generates the possible errors requireAtLeastOneParameter() can die with.
$params | array Array of parameter key names |
Definition at line 833 of file ApiBase.php.
ApiBase::getRequireMaxOneParameterErrorMessages | ( | $params | ) |
Generates the possible error requireMaxOneParameter() can die with.
$params | array |
Definition at line 791 of file ApiBase.php.
Referenced by ApiQueryLangLinks\getPossibleErrors(), ApiQueryContributors\getPossibleErrors(), ApiSetNotificationTimestamp\getPossibleErrors(), and ApiQueryBlocks\getPossibleErrors().
ApiBase::getRequireOnlyOneParameterErrorMessages | ( | $params | ) |
Generates the possible errors requireOnlyOneParameter() can die with.
$params | array |
Definition at line 748 of file ApiBase.php.
Referenced by ApiMove\getPossibleErrors(), ApiSetNotificationTimestamp\getPossibleErrors(), and ApiUpload\getPossibleErrors().
ApiBase::getResult | ( | ) |
Get the result object.
Reimplemented in ApiMain.
Definition at line 205 of file ApiBase.php.
Referenced by ApiQueryBase\addPageSubItem(), ApiQueryBase\addPageSubItems(), ApiQueryORM\addSerializedResults(), ApiUpload\checkVerification(), ApiComparePages\execute(), ApiCreateAccount\execute(), ApiProtect\execute(), ApiUndelete\execute(), ApiTokens\execute(), ApiMove\execute(), ApiEmailUser\execute(), ApiQueryStashImageInfo\execute(), ApiRevisionDelete\execute(), ApiRsd\execute(), ApiImport\execute(), ApiEditPage\execute(), ApiUpload\execute(), ApiUserrights\execute(), ApiWatch\execute(), ApiSetNotificationTimestamp\execute(), ApiParse\execute(), ApiPatrol\execute(), ApiHelp\execute(), ApiExpandTemplates\execute(), ApiOptions\execute(), ApiFileRevert\execute(), ApiQueryAllMessages\execute(), ApiQueryDeletedrevs\execute(), ApiUnblock\execute(), ApiPurge\execute(), ApiQueryUserInfo\execute(), ApiRollback\execute(), ApiQueryFilearchive\execute(), ApiQueryPageProps\execute(), ApiDelete\execute(), ApiFeedContributions\execute(), ApiParamInfo\execute(), ApiBlock\execute(), ApiFeedRecentChanges\execute(), ApiQueryBlocks\execute(), ApiQueryContributions\execute(), ApiQueryFileRepoInfo\execute(), ApiQueryLogEvents\execute(), ApiQueryPagePropNames\execute(), ApiQueryTags\execute(), ApiQueryImageInfo\execute(), ApiQueryAllUsers\execute(), ApiOpenSearch\execute(), ApiQueryContributors\execute(), ApiLogin\execute(), ApiImageRotate\execute(), ApiFeedWatchlist\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\execute(), ApiQuery\execute(), ApiQueryInfo\execute(), ApiQueryInfo\extractPageInfo(), ApiQueryWatchlist\extractRowInfo(), ApiQueryContributions\extractRowInfo(), ApiQueryLogEvents\extractRowInfo(), ApiQueryRecentChanges\extractRowInfo(), ApiQueryRevisions\extractRowInfo(), ApiRevisionDelete\extractStatusInfo(), ApiParse\formatLimitReportData(), ApiRsd\formatRsdApiList(), ApiRevisionDelete\formatStatusMessages(), ApiParamInfo\getClassInfo(), ApiQueryUserInfo\getCurrentUserInfo(), ApiQuery\outputGeneralPageInfo(), ApiUpload\performUpload(), ApiQueryPrefixSearch\run(), ApiQueryLangBacklinks\run(), ApiQueryIWBacklinks\run(), ApiQueryProtectedTitles\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryAllCategories\run(), ApiQueryCategoryMembers\run(), ApiQueryPagesWithProp\run(), ApiQueryWatchlist\run(), ApiQuerySearch\run(), ApiQueryQueryPage\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryRandom\run(), ApiQueryAllLinks\run(), ApiQueryRecentChanges\run(), ApiQueryBacklinks\run(), ApiQueryRandom\runQuery(), ApiUpload\selectUploadModule(), ApiQueryBase\setContinueEnumParameter(), ApiQueryORM\setIndexedTagNames(), ApiParse\setIndexedTagNames(), and ApiUpload\transformWarnings().
ApiBase::getResultData | ( | ) |
Get the result data array (read-only)
Definition at line 219 of file ApiBase.php.
Referenced by ApiFormatPhp\execute(), ApiFormatDbg\execute(), ApiFormatTxt\execute(), ApiFormatDump\execute(), ApiFormatRaw\execute(), ApiFormatJson\execute(), ApiFormatFeedWrapper\execute(), and ApiFormatRaw\getMimeType().
|
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 function directly: use getFinalResultProperties() to allow hooks to modify descriptions as needed.
Reimplemented in ApiQueryImageInfo, ApiQueryInfo, ApiQueryRevisions, ApiQueryRecentChanges, ApiUpload, ApiEditPage, ApiQueryWatchlist, ApiQueryContributions, ApiQueryLogEvents, ApiQueryBacklinks, ApiQueryDeletedrevs, ApiQueryAllUsers, ApiQueryAllImages, ApiQueryCategoryMembers, ApiQueryBlocks, ApiQuerySearch, ApiQueryAllLinks, ApiQueryAllPages, ApiQueryUsers, ApiQueryFilearchive, ApiQueryAllMessages, ApiQueryProtectedTitles, ApiMove, ApiQueryExtLinksUsage, ApiQueryUserInfo, ApiQueryCategories, ApiSetNotificationTimestamp, ApiDelete, ApiCreateAccount, ApiQueryLinks, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryAllCategories, ApiProtect, ApiWatch, ApiLogin, ApiQueryLangLinks, ApiQueryWatchlistRaw, ApiQueryDuplicateFiles, ApiBlock, ApiQueryRandom, ApiQueryIWLinks, ApiQueryImages, ApiQueryTags, ApiQueryQueryPage, ApiOptions, ApiPurge, ApiFileRevert, ApiQueryExternalLinks, ApiComparePages, ApiImport, ApiUndelete, ApiQueryStashImageInfo, ApiRollback, ApiQueryCategoryInfo, ApiEmailUser, ApiUnblock, ApiExpandTemplates, ApiPatrol, ApiTokens, and ApiLogout.
Definition at line 625 of file ApiBase.php.
ApiBase::getTitleOrPageId | ( | $params, | |
$load = false |
|||
) |
$params | array | |
bool | string | $load | Whether load the object's state from the database:
|
Definition at line 853 of file ApiBase.php.
Referenced by ApiProtect\execute(), ApiEditPage\execute(), ApiParse\execute(), ApiDelete\execute(), and ApiQueryCategoryMembers\run().
ApiBase::getTitleOrPageIdErrorMessage | ( | ) |
Definition at line 885 of file ApiBase.php.
Referenced by ApiProtect\getPossibleErrors(), ApiDelete\getPossibleErrors(), ApiQueryCategoryMembers\getPossibleErrors(), and ApiEditPage\getPossibleErrors().
ApiBase::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.
Reimplemented in ApiUpload, ApiEditPage, ApiMove, ApiDelete, ApiBlock, ApiProtect, ApiRevisionDelete, ApiImageRotate, ApiOptions, ApiSetNotificationTimestamp, ApiFileRevert, ApiImport, ApiWatch, ApiUndelete, ApiRollback, ApiUnblock, ApiEmailUser, ApiPatrol, and ApiUserrights.
Definition at line 2060 of file ApiBase.php.
ApiBase::getVersion | ( | ) |
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 MockApi, and MockApiQueryBase.
Definition at line 138 of file ApiBase.php.
ApiBase::getWatchlistUser | ( | $params | ) |
Gets the user for whom to get the watchlist.
$params | array |
Definition at line 2070 of file ApiBase.php.
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' |
$titleObj | Title 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 913 of file ApiBase.php.
Referenced by ApiEditPage\execute(), and ApiUpload\performUpload().
|
private |
ApiBase::isMain | ( | ) |
Returns true if this module is the main module ($this === $this->mMainModule), false otherwise.
Definition at line 197 of file ApiBase.php.
Referenced by __construct().
ApiBase::isReadMode | ( | ) |
Indicates whether this module requires read rights.
Reimplemented in ApiMain, ApiParamInfo, ApiCreateAccount, ApiLogin, ApiHelp, ApiLogout, and ApiDisabled.
Definition at line 2022 of file ApiBase.php.
ApiBase::isWriteMode | ( | ) |
Indicates whether this module requires write mode.
Reimplemented in ApiUpload, ApiEditPage, ApiSetNotificationTimestamp, ApiMove, ApiCreateAccount, ApiDelete, ApiImageRotate, ApiRevisionDelete, ApiWatch, ApiBlock, ApiProtect, ApiOptions, ApiPurge, ApiFileRevert, ApiImport, ApiUndelete, ApiUserrights, ApiEmailUser, ApiUnblock, ApiRollback, and ApiPatrol.
Definition at line 2030 of file ApiBase.php.
|
protected |
string | $prefix | Text to split output items |
string | $title | What is being output |
$input | string|array |
Definition at line 364 of file ApiBase.php.
ApiBase::makeHelpMsg | ( | ) |
Generates help message for this module, or false if there is no description.
Reimplemented in ApiMain, and ApiQuery.
Definition at line 286 of file ApiBase.php.
ApiBase::makeHelpMsgParameters | ( | ) |
Generates the parameter descriptions for this module, to be displayed in the module's help.
Definition at line 391 of file ApiBase.php.
ApiBase::mustBePosted | ( | ) |
Indicates whether this module must be called with a POST request.
Reimplemented in ApiUpload, ApiEditPage, ApiSetNotificationTimestamp, ApiMove, ApiDelete, ApiCreateAccount, ApiLogin, ApiImageRotate, ApiRevisionDelete, ApiWatch, ApiBlock, ApiProtect, ApiOptions, ApiPurge, ApiFileRevert, ApiImport, ApiUndelete, ApiUserrights, ApiEmailUser, ApiUnblock, ApiRollback, and ApiPatrol.
Definition at line 2038 of file ApiBase.php.
ApiBase::needsToken | ( | ) |
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, ApiRevisionDelete, ApiImageRotate, ApiOptions, ApiSetNotificationTimestamp, ApiFileRevert, ApiImport, ApiWatch, ApiUndelete, ApiRollback, ApiUnblock, ApiEmailUser, ApiPatrol, and ApiUserrights.
Definition at line 2048 of file ApiBase.php.
|
private |
Callback function used in requireOnlyOneParameter to check whether required parameters are set.
$x | object Parameter to check is not null/false |
Definition at line 901 of file ApiBase.php.
ApiBase::parseErrors | ( | $errors | ) |
Parses a list of errors into a standardised format.
array | $errors | List of errors. Items can be in the for array( key, param1, param2, ... ) or array( 'code' => ..., 'info' => ... ) |
Definition at line 2180 of file ApiBase.php.
Referenced by ApiParamInfo\getClassInfo().
ApiBase::parseMsg | ( | $error | ) |
Return the error message related to a certain array.
array | $error | Element of a getUserPermissionsErrors()-style array |
Definition at line 1978 of file ApiBase.php.
Referenced by ApiImageRotate\checkPermissions(), ApiUpload\dieRecoverableError(), ApiMove\execute(), ApiPurge\execute(), and ApiMove\moveSubpages().
|
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) |
$value | mixed The value being parsed | |
bool | $allowMultiple | 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 1189 of file ApiBase.php.
ApiBase::profileDBIn | ( | ) |
Start module profiling.
Definition at line 2262 of file ApiBase.php.
Referenced by ApiQueryBase\checkRowCount(), ApiQuery\getNamedDB(), ApiPageSet\getRedirectTargets(), ApiPageSet\initFromPageIds(), ApiPageSet\initFromRevIDs(), ApiPageSet\initFromTitles(), ApiPageSet\resolvePendingRedirects(), and ApiQueryBase\select().
ApiBase::profileDBOut | ( | ) |
End database profiling.
Definition at line 2279 of file ApiBase.php.
Referenced by ApiQueryBase\checkRowCount(), ApiQuery\getNamedDB(), ApiPageSet\getRedirectTargets(), ApiPageSet\initFromPageIds(), ApiPageSet\initFromRevIDs(), ApiPageSet\initFromTitles(), ApiPageSet\resolvePendingRedirects(), and ApiQueryBase\select().
ApiBase::profileIn | ( | ) |
Start module profiling.
Definition at line 2202 of file ApiBase.php.
Referenced by ApiPageSet\__construct(), ApiMain\execute(), ApiPageSet\executeInternal(), ApiPageSet\populateFromPageIDs(), ApiPageSet\populateFromQueryResult(), ApiPageSet\populateFromRevisionIDs(), ApiPageSet\populateFromTitles(), and ApiMain\printResult().
ApiBase::profileOut | ( | ) |
End module profiling.
Definition at line 2213 of file ApiBase.php.
Referenced by ApiPageSet\__construct(), ApiMain\execute(), ApiPageSet\executeInternal(), ApiPageSet\populateFromPageIDs(), ApiPageSet\populateFromQueryResult(), ApiPageSet\populateFromRevisionIDs(), and ApiPageSet\populateFromTitles().
ApiBase::requireAtLeastOneParameter | ( | $params | ) |
Die if none of a certain set of parameters is set and not false.
array | $params | User provided set of parameters |
string | ... List of parameter names to check |
Definition at line 810 of file ApiBase.php.
ApiBase::requireMaxOneParameter | ( | $params | ) |
Die if more than one of a certain set of parameters is set and not false.
$params | array |
Definition at line 769 of file ApiBase.php.
Referenced by ApiSetNotificationTimestamp\execute(), ApiQueryLangLinks\execute(), ApiQueryBlocks\execute(), and ApiQueryContributors\execute().
ApiBase::requireOnlyOneParameter | ( | $params | ) |
Die if none or more than one of a certain set of parameters is set and not false.
array | $params | of parameter names |
Definition at line 722 of file ApiBase.php.
Referenced by ApiMove\execute(), ApiPatrol\execute(), ApiUserrights\getUrUser(), and ApiUpload\selectUploadModule().
ApiBase::safeProfileOut | ( | ) |
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 2233 of file ApiBase.php.
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 245 of file ApiBase.php.
Referenced by ApiResult\addValue(), ApiTokens\execute(), ApiParse\execute(), ApiOptions\execute(), ApiPurge\execute(), ApiQueryDisabled\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\execute(), ApiPageSet\executeInternal(), ApiQueryInfo\extractPageInfo(), ApiQueryRecentChanges\extractRowInfo(), ApiQueryRevisions\extractRowInfo(), ApiParse\languagesHtml(), ApiQueryImageInfo\mergeThumbParams(), ApiMain\printResult(), ApiMain\reportUnusedParams(), ApiQueryImages\run(), ApiQueryCategories\run(), and ApiQueryLinks\run().
|
protected |
Set a watch (or unwatch) based the based on a watchlist parameter.
string | $watch | Valid values: 'watch', 'unwatch', 'preferences', 'nochange' |
$titleObj | Title the article's title to change | |
string | $userOption | The user option to consider when $watch=preferences |
Definition at line 952 of file ApiBase.php.
Referenced by ApiProtect\execute(), ApiUndelete\execute(), ApiMove\execute(), ApiRollback\execute(), and ApiDelete\execute().
ApiBase::shouldCheckMaxlag | ( | ) |
Indicates if this module needs maxlag to be checked.
Reimplemented in ApiQuery, and ApiHelp.
Definition at line 2014 of file ApiBase.php.
|
static |
Truncate an array to a certain length.
array | $arr | Array to truncate |
int | $limit | Maximum length |
Definition at line 1341 of file ApiBase.php.
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.
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 |
$enforceLimits | Boolean Whether to enforce (die) if value is outside limits |
Definition at line 1253 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryRevisions\execute(), and ApiQueryBacklinks\run().
ApiBase::validateTimestamp | ( | $value, | |
$encParamName | |||
) |
Validate and normalize of parameters of type 'timestamp'.
string | $value | Parameter value |
string | $encParamName | Parameter name |
Definition at line 1291 of file ApiBase.php.
|
private |
Validate and normalize of parameters of type 'user'.
string | $value | Parameter value |
string | $encParamName | Parameter name |
Definition at line 1309 of file ApiBase.php.
|
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 1327 of file ApiBase.php.
ApiBase::$mDBTime = 0 |
Definition at line 2257 of file ApiBase.php.
|
private |
Profiling: database execution time.
Definition at line 2257 of file ApiBase.php.
|
static |
Array that maps message keys to error messages.
$1 and friends are replaced.
Definition at line 1429 of file ApiBase.php.
|
private |
Definition at line 90 of file ApiBase.php.
ApiBase::$mModuleName |
Definition at line 90 of file ApiBase.php.
ApiBase::$mModulePrefix |
Definition at line 90 of file ApiBase.php.
ApiBase::$mModuleTime = 0 |
Definition at line 2197 of file ApiBase.php.
|
private |
Definition at line 92 of file ApiBase.php.
|
private |
Definition at line 91 of file ApiBase.php.
|
private |
Profiling: total module execution time.
Definition at line 2197 of file ApiBase.php.
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 88 of file ApiBase.php.
Referenced by ApiQueryLogEvents\getAllowedParams(), ApiPageSet\getAllowedParams(), and ApiParamInfo\getClassInfo().
const ApiBase::LIMIT_BIG1 = 500 |
Definition at line 78 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryRevisions\execute(), ApiQueryPagePropNames\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryRedirects\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), and ApiQueryBacklinks\run().
const ApiBase::LIMIT_BIG2 = 5000 |
Definition at line 79 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryRevisions\execute(), ApiQueryPagePropNames\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryRedirects\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), and ApiQueryBacklinks\run().
const ApiBase::LIMIT_SML1 = 50 |
Definition at line 80 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryRevisions\execute(), ApiQuerySearch\getAllowedParams(), and ApiParamInfo\getClassInfo().
const ApiBase::LIMIT_SML2 = 500 |
Definition at line 81 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryRevisions\execute(), ApiQuerySearch\getAllowedParams(), and ApiParamInfo\getClassInfo().
const ApiBase::PARAM_ALLOW_DUPLICATES = 6 |
Definition at line 58 of file ApiBase.php.
Referenced by ApiProtect\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), and ApiParamInfo\getClassInfo().
const ApiBase::PARAM_DEPRECATED = 7 |
Definition at line 60 of file ApiBase.php.
Referenced by ApiQueryStashImageInfo\getAllowedParams(), ApiHelp\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiProtect\getAllowedParams(), ApiWatch\getAllowedParams(), ApiDelete\getAllowedParams(), ApiMove\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiUpload\getAllowedParams(), and ApiParamInfo\getClassInfo().
const ApiBase::PARAM_DFLT = 0 |
Definition at line 46 of file ApiBase.php.
Referenced by ApiQueryFileRepoInfo\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiTokens\getAllowedParams(), ApiQueryStashImageInfo\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiQueryPagePropNames\getAllowedParams(), ApiRollback\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiFileRevert\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiOptions\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiProtect\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiRevisionDelete\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiDelete\getAllowedParams(), ApiCreateAccount\getAllowedParams(), ApiMove\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryUserInfo\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), ApiQueryRedirects\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiParse\getAllowedParams(), ApiUpload\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQueryInfo\getAllowedParams(), ApiMain\getAllowedParams(), ORMTable\getAPIParams(), and ApiParamInfo\getClassInfo().
const ApiBase::PARAM_ISMULTI = 1 |
Definition at line 48 of file ApiBase.php.
Referenced by ApiQueryFileRepoInfo\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiTokens\getAllowedParams(), ApiQueryStashImageInfo\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiQueryPageProps\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiOptions\getAllowedParams(), ApiHelp\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiProtect\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiRevisionDelete\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryUserInfo\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), ApiQueryRedirects\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiParamInfo\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQuery\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiParse\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQueryInfo\getAllowedParams(), ApiPageSet\getAllowedParams(), ORMTable\getAPIParams(), and ApiParamInfo\getClassInfo().
const ApiBase::PARAM_MAX = 3 |
Definition at line 52 of file ApiBase.php.
Referenced by ApiOpenSearch\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiQueryPagePropNames\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryRedirects\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), and ApiParamInfo\getClassInfo().
const ApiBase::PARAM_MAX2 = 4 |
Definition at line 54 of file ApiBase.php.
Referenced by ApiOpenSearch\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiQueryPagePropNames\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryRedirects\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), and ApiParamInfo\getClassInfo().
const ApiBase::PARAM_MIN = 5 |
Definition at line 56 of file ApiBase.php.
Referenced by ApiOpenSearch\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiQueryPagePropNames\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryRedirects\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), and ApiParamInfo\getClassInfo().
const ApiBase::PARAM_RANGE_ENFORCE = 9 |
Definition at line 66 of file ApiBase.php.
const ApiBase::PARAM_REQUIRED = 8 |
Definition at line 62 of file ApiBase.php.
Referenced by ApiPatrol\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiRollback\getAllowedParams(), ApiEmailUser\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiImport\getAllowedParams(), ApiFileRevert\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiOptions\getAllowedParams(), ApiProtect\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiBlock\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiWatch\getAllowedParams(), ApiRevisionDelete\getAllowedParams(), ApiImageRotate\getAllowedParams(), ApiDelete\getAllowedParams(), ApiCreateAccount\getAllowedParams(), ApiMove\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiUpload\getAllowedParams(), ORMTable\getAPIParams(), and ApiParamInfo\getClassInfo().
const ApiBase::PARAM_TYPE = 2 |
Definition at line 50 of file ApiBase.php.
Referenced by ApiQueryFileRepoInfo\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiTokens\getAllowedParams(), ApiPatrol\getAllowedParams(), ApiQueryStashImageInfo\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiQueryPrefixSearch\getAllowedParams(), ApiRollback\getAllowedParams(), ApiQueryPagePropNames\getAllowedParams(), ApiUnblock\getAllowedParams(), ApiEmailUser\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiImport\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiComparePages\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiFileRevert\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiOptions\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiProtect\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiBlock\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiWatch\getAllowedParams(), ApiRevisionDelete\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiImageRotate\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiDelete\getAllowedParams(), ApiCreateAccount\getAllowedParams(), ApiMove\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryUserInfo\getAllowedParams(), ApiSetNotificationTimestamp\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), ApiQueryRedirects\getAllowedParams(), ApiQueryContributors\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiParamInfo\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryBacklinks\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQuery\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiParse\getAllowedParams(), ApiUpload\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQueryInfo\getAllowedParams(), ApiMain\getAllowedParams(), ApiPageSet\getAllowedParams(), ORMTable\getAPIParams(), and ApiParamInfo\getClassInfo().
const ApiBase::PROP_LIST = 'LIST' |
Definition at line 73 of file ApiBase.php.
Referenced by ApiParamInfo\getClassInfo(), ApiQueryCategoryInfo\getResultProperties(), ApiImport\getResultProperties(), ApiPurge\getResultProperties(), ApiSetNotificationTimestamp\getResultProperties(), ApiQueryUserInfo\getResultProperties(), and ApiQueryInfo\getResultProperties().
const ApiBase::PROP_NULLABLE = 1 |
Definition at line 76 of file ApiBase.php.
Referenced by ApiParamInfo\getClassInfo(), ApiUnblock\getResultProperties(), ApiEmailUser\getResultProperties(), ApiQueryCategoryInfo\getResultProperties(), ApiComparePages\getResultProperties(), ApiFileRevert\getResultProperties(), ApiPurge\getResultProperties(), ApiQueryQueryPage\getResultProperties(), ApiQueryIWLinks\getResultProperties(), ApiBlock\getResultProperties(), ApiQueryWatchlistRaw\getResultProperties(), ApiQueryLangLinks\getResultProperties(), ApiLogin\getResultProperties(), ApiCreateAccount\getResultProperties(), ApiSetNotificationTimestamp\getResultProperties(), ApiQueryUserInfo\getResultProperties(), ApiMove\getResultProperties(), ApiQueryProtectedTitles\getResultProperties(), ApiQueryAllMessages\getResultProperties(), ApiQueryFilearchive\getResultProperties(), ApiQueryUsers\getResultProperties(), ApiQuerySearch\getResultProperties(), ApiQueryBlocks\getResultProperties(), ApiQueryAllUsers\getResultProperties(), ApiQueryLogEvents\getResultProperties(), ApiQueryContributions\getResultProperties(), ApiQueryWatchlist\getResultProperties(), ApiEditPage\getResultProperties(), ApiUpload\getResultProperties(), ApiQueryRecentChanges\getResultProperties(), ApiQueryRevisions\getResultProperties(), ApiQueryInfo\getResultProperties(), and ApiQueryImageInfo\getResultPropertiesFiltered().
const ApiBase::PROP_ROOT = 'ROOT' |
Definition at line 70 of file ApiBase.php.
Referenced by ApiParamInfo\getClassInfo(), ApiQueryQueryPage\getResultProperties(), and ApiSetNotificationTimestamp\getResultProperties().
const ApiBase::PROP_TYPE = 0 |
Definition at line 74 of file ApiBase.php.
Referenced by ApiParamInfo\getClassInfo(), ApiUnblock\getResultProperties(), ApiEmailUser\getResultProperties(), ApiQueryCategoryInfo\getResultProperties(), ApiComparePages\getResultProperties(), ApiFileRevert\getResultProperties(), ApiPurge\getResultProperties(), ApiOptions\getResultProperties(), ApiQueryQueryPage\getResultProperties(), ApiQueryIWLinks\getResultProperties(), ApiBlock\getResultProperties(), ApiQueryWatchlistRaw\getResultProperties(), ApiQueryLangLinks\getResultProperties(), ApiLogin\getResultProperties(), ApiCreateAccount\getResultProperties(), ApiSetNotificationTimestamp\getResultProperties(), ApiQueryUserInfo\getResultProperties(), ApiMove\getResultProperties(), ApiQueryProtectedTitles\getResultProperties(), ApiQueryAllMessages\getResultProperties(), ApiQueryFilearchive\getResultProperties(), ApiQueryUsers\getResultProperties(), ApiQuerySearch\getResultProperties(), ApiQueryBlocks\getResultProperties(), ApiQueryCategoryMembers\getResultProperties(), ApiQueryAllUsers\getResultProperties(), ApiQueryLogEvents\getResultProperties(), ApiQueryContributions\getResultProperties(), ApiQueryWatchlist\getResultProperties(), ApiEditPage\getResultProperties(), ApiUpload\getResultProperties(), ApiQueryRecentChanges\getResultProperties(), ApiQueryRevisions\getResultProperties(), ApiQueryInfo\getResultProperties(), and ApiQueryImageInfo\getResultPropertiesFiltered().