MediaWiki
REL1_22
|
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. | |
dieStatus ($status) | |
Throw a UsageException based on the errors in the Status object. | |
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. | |
dieUsageMsgOrDebug ($error) | |
Will only set a warning instead of failing if the global $wgDebugAPI is set to true. | |
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 ($flags=0) | |
Get final list of parameters, after hooks have had a chance to tweak it as needed. | |
getFinalPossibleErrors () | |
Get final list of possible errors, 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. | |
getModuleManager () | |
Get the module manager, or null if this module has no sub-modules. | |
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. | |
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, $encParamName) | |
Validate and normalize of parameters of type 'timestamp'. | |
Static Public Member Functions | |
static | debugPrint ($value, $name= 'unknown', $backtrace=false) |
Debugging function that prints a value and an optional backtrace. | |
static | getValidNamespaces () |
static | truncateArray (&$arr, $limit) |
Truncate an array to a certain length. | |
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. | |
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 | |
dieContinueUsageIf ($condition) | |
Die with the $prefix. | |
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 () | |
Gets a default slave database connection object. | |
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 required parameters are set. | |
validateUser ($value, $encParamName) | |
Validate and normalize of parameters of type 'user'. | |
warnOrDie ($msg, $enforceLimits=false) | |
Adds a warning to the output, else dies. | |
Private Attributes | |
$mDBTimeIn = 0 | |
Profiling: database execution time. | |
$mMainModule | |
$mParamCache = array() | |
$mSlaveDB = null | |
$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 | |
string | $moduleName | Name of this module |
string | $modulePrefix | Prefix to use for parameter names |
Reimplemented in ApiQueryImageInfo.
Definition at line 86 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 609 of file ApiBase.php.
References array(), as, PROP_NULLABLE, and PROP_TYPE.
Referenced by ApiTokens\getResultProperties(), 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 217 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 | |
string | $name | Description of the printed value |
bool | $backtrace | If true, print a backtrace |
Definition at line 1804 of file ApiBase.php.
References $value, print, and wfBacktrace().
ApiBase::dieContinueUsageIf | ( | $ | condition | ) | [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 1465 of file ApiBase.php.
References dieUsage().
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryLangLinks\execute(), ApiQueryIWLinks\execute(), ApiQueryFilearchive\execute(), ApiQueryPagePropNames\execute(), ApiQueryImageInfo\execute(), ApiQueryRevisions\execute(), ApiQueryInfo\execute(), ApiQueryContributions\prepareQuery(), ApiQueryImages\run(), ApiQueryIWBacklinks\run(), ApiQueryLangBacklinks\run(), ApiQueryWatchlistRaw\run(), ApiQueryDuplicateFiles\run(), ApiQueryCategories\run(), ApiQueryCategoryMembers\run(), ApiQueryAllCategories\run(), ApiQueryPagesWithProp\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryLinks\run(), and ApiQueryAllLinks\run().
static ApiBase::dieDebug | ( | $ | method, |
$ | message | ||
) | [static, protected] |
Internal code errors should be reported with this method.
string | $method | Method or function name |
string | $message | Error message |
Definition at line 1505 of file ApiBase.php.
Referenced by ApiQueryAllLinks\__construct(), ApiQueryLinks\__construct(), ApiQueryBase\addJoinConds(), ApiQueryBase\addTables(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\execute(), ApiQueryAllUsers\execute(), ApiLogin\execute(), ApiFormatRaw\execute(), ApiQueryRevisions\execute(), ApiFormatFeedWrapper\execute(), ApiResult\execute(), ApiFormatRaw\getMimeType(), getParameterFromSettings(), getProfileDBTime(), getProfileTime(), getResult(), profileDBIn(), profileDBOut(), profileIn(), profileOut(), ApiFormatXml\recXmlPrint(), ApiResult\setContent(), ApiResult\setElement(), ApiQueryGeneratorBase\setGeneratorMode(), ApiResult\setIndexedTagName(), and ApiFormatWddx\slowWddxPrinter().
Helper function for readonly errors.
Definition at line 1420 of file ApiBase.php.
References array(), dieUsage(), parseMsg(), and wfReadOnlyReason().
Referenced by ApiEditPage\execute().
ApiBase::dieStatus | ( | $ | status | ) |
Throw a UsageException based on the errors in the Status object.
UsageException |
Definition at line 1226 of file ApiBase.php.
References $messageMap, array(), dieUsage(), and wfMessage().
Referenced by ApiCreateAccount\execute(), ApiProtect\execute(), ApiWatch\execute(), ApiImport\execute(), ApiDelete\execute(), and ApiUserrights\getUrUser().
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 1214 of file ApiBase.php.
References encodeParamName(), and Profiler\instance().
Referenced by ApiQuerySiteinfo\appendDbReplLagInfo(), dieContinueUsageIf(), dieReadOnly(), dieStatus(), dieUsageMsg(), ApiComparePages\execute(), ApiCreateAccount\execute(), ApiQueryStashImageInfo\execute(), ApiWatch\execute(), ApiEditPage\execute(), ApiPatrol\execute(), ApiSetNotificationTimestamp\execute(), ApiHelp\execute(), ApiQueryDeletedrevs\execute(), ApiOptions\execute(), ApiQueryAllMessages\execute(), ApiUpload\execute(), ApiDisabled\execute(), ApiQueryFilearchive\execute(), ApiFeedContributions\execute(), ApiQueryBlocks\execute(), ApiQueryLogEvents\execute(), ApiQueryContributions\execute(), ApiQueryAllUsers\execute(), ApiFeedWatchlist\execute(), ApiQueryRevisions\execute(), ApiQueryAllPages\executeGenerator(), ApiQueryAllImages\executeGenerator(), ApiQueryRevisions\extractRowInfo(), getParameterFromSettings(), ApiQueryImageInfo\getScale(), getTitleOrPageId(), getWatchlistUser(), ApiQueryImageInfo\mergeThumbParams(), parseMultiValue(), ApiQueryContributions\prepareQuery(), ApiQueryBase\prepareUrlQuerySearchString(), ApiQueryContributions\prepareUsername(), ApiQueryBlocks\prepareUsername(), requireMaxOneParameter(), requireOnlyOneParameter(), ApiComparePages\revisionOrTitleOrId(), ApiQueryCategoryMembers\run(), ApiQueryWatchlist\run(), ApiQuerySearch\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryAllLinks\run(), ApiQueryRecentChanges\run(), validateTimestamp(), validateUser(), 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 1430 of file ApiBase.php.
References $error, array(), dieUsage(), and parseMsg().
Referenced by dieUsageMsgOrDebug(), ApiCreateAccount\execute(), ApiUndelete\execute(), ApiProtect\execute(), ApiEmailUser\execute(), ApiMove\execute(), ApiWatch\execute(), ApiImport\execute(), ApiEditPage\execute(), ApiExpandTemplates\execute(), ApiPatrol\execute(), ApiQueryAllMessages\execute(), ApiUnblock\execute(), ApiQueryLangLinks\execute(), ApiOptions\execute(), ApiUpload\execute(), ApiQueryIWLinks\execute(), ApiRollback\execute(), ApiBlock\execute(), ApiQueryBlocks\execute(), ApiDelete\execute(), ApiQueryRevisions\execute(), getParameterFromSettings(), getTitleOrPageId(), ApiQueryBase\keyToTitle(), ApiQueryContributions\prepareQuery(), ApiComparePages\revisionOrTitleOrId(), ApiQueryLangBacklinks\run(), ApiQueryIWBacklinks\run(), ApiQueryWatchlistRaw\run(), ApiQueryCategories\run(), ApiQueryWatchlist\run(), ApiQueryQueryPage\run(), ApiQueryRecentChanges\run(), and ApiQueryBase\titleToKey().
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 1446 of file ApiBase.php.
References $error, array(), dieUsageMsg(), global, parseMsg(), and setWarning().
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 636 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 ApiResult, ApiFormatFeedWrapper, ApiMain, ApiQueryInfo, ApiQuery, MockApi, ApiQueryRecentChanges, ApiPageSet, ApiQueryBacklinks, ApiQueryRevisions, ApiQueryORM, ApiQueryAllLinks, ApiQueryUsers, ApiQueryLinks, ApiPurge, ApiFormatJson, ApiFormatRaw, ApiImageRotate, ApiQueryAllImages, ApiFeedWatchlist, ApiQueryQueryPage, ApiFormatXml, ApiLogin, ApiQueryAllUsers, ApiOpenSearch, ApiQueryFileRepoInfo, ApiQuerySearch, ApiQueryTags, ApiQueryImageInfo, ApiQueryLogEvents, ApiQueryPagePropNames, ApiQueryContributions, ApiDelete, ApiQueryBlocks, ApiQueryRandom, ApiBlock, ApiFeedContributions, ApiParamInfo, ApiFormatDbg, ApiFormatDump, ApiFormatTxt, ApiQueryFilearchive, ApiQueryPageProps, ApiQueryUserInfo, ApiRollback, ApiDisabled, ApiFileRevert, ApiQueryAllCategories, ApiQueryCategoryInfo, ApiQueryDisabled, ApiQueryImages, ApiQueryIWLinks, ApiQueryPagesWithProp, ApiQueryWatchlist, ApiQueryWatchlistRaw, ApiOptions, ApiQueryAllMessages, ApiQueryAllPages, ApiQueryCategories, ApiQueryCategoryMembers, ApiQueryDeletedrevs, ApiQueryDuplicateFiles, ApiQueryExternalLinks, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryLangLinks, ApiQueryProtectedTitles, ApiQuerySiteinfo, ApiUnblock, ApiUpload, ApiFormatNone, ApiFormatPhp, ApiFormatWddx, ApiHelp, ApiEditPage, ApiExpandTemplates, ApiParse, ApiPatrol, ApiQueryExtLinksUsage, ApiSetNotificationTimestamp, ApiLogout, ApiUserrights, ApiImport, ApiQueryStashImageInfo, ApiRsd, ApiWatch, ApiEmailUser, ApiMove, ApiProtect, ApiTokens, ApiUndelete, ApiCreateAccount, 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 649 of file ApiBase.php.
References $params, array(), as, getFinalParams(), and getParameterFromSettings().
Referenced by ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendLanguages(), ApiComparePages\execute(), ApiCreateAccount\execute(), ApiTokens\execute(), ApiUndelete\execute(), ApiProtect\execute(), ApiMove\execute(), ApiEmailUser\execute(), ApiQueryStashImageInfo\execute(), ApiImport\execute(), ApiWatch\execute(), ApiUserrights\execute(), ApiSetNotificationTimestamp\execute(), ApiEditPage\execute(), ApiPatrol\execute(), ApiExpandTemplates\execute(), ApiHelp\execute(), ApiUnblock\execute(), ApiQueryDeletedrevs\execute(), ApiQueryExternalLinks\execute(), ApiOptions\execute(), ApiUpload\execute(), ApiQueryLangLinks\execute(), ApiQueryAllMessages\execute(), ApiQuerySiteinfo\execute(), ApiQueryCategoryInfo\execute(), ApiFileRevert\execute(), ApiQueryIWLinks\execute(), ApiQueryUserInfo\execute(), ApiRollback\execute(), ApiQueryFilearchive\execute(), ApiQueryPageProps\execute(), ApiFeedContributions\execute(), ApiBlock\execute(), ApiParamInfo\execute(), ApiDelete\execute(), ApiQueryBlocks\execute(), ApiQueryContributions\execute(), ApiQueryLogEvents\execute(), ApiQueryPagePropNames\execute(), ApiQueryImageInfo\execute(), ApiQueryTags\execute(), ApiOpenSearch\execute(), ApiQueryFileRepoInfo\execute(), ApiQueryAllUsers\execute(), ApiLogin\execute(), ApiFormatXml\execute(), ApiFeedWatchlist\execute(), ApiImageRotate\execute(), ApiFormatJson\execute(), ApiPurge\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\execute(), ApiQueryInfo\execute(), ApiOpenSearch\getCustomPrinter(), ApiFormatJson\getMimeType(), ApiQueryORM\getParams(), ApiUserrights\getUrUser(), ApiQueryIWBacklinks\run(), ApiQueryLangBacklinks\run(), ApiQueryImages\run(), ApiQueryProtectedTitles\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryDuplicateFiles\run(), ApiQueryCategories\run(), ApiQueryAllCategories\run(), ApiQueryCategoryMembers\run(), ApiQueryWatchlist\run(), ApiQueryPagesWithProp\run(), ApiQuerySearch\run(), ApiQueryAllPages\run(), ApiQueryQueryPage\run(), ApiQueryAllImages\run(), ApiQueryLinks\run(), ApiQueryAllLinks\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.
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, ApiUpload, ApiQuerySiteinfo, ApiQueryRevisions, ApiParse, ApiQueryRecentChanges, ApiEditPage, ApiQueryImageInfo, ApiQueryBacklinks, ApiQueryLogEvents, ApiQueryContributions, ApiQueryWatchlist, ApiQueryAllUsers, ApiParamInfo, ApiQueryDeletedrevs, ApiQueryUsers, ApiQueryAllImages, ApiQueryCategoryMembers, ApiQueryBlocks, ApiQueryORM, MockApi, ApiQueryAllLinks, ApiQueryFilearchive, ApiQueryAllPages, ApiFormatXml, ApiQuerySearch, ApiQueryAllMessages, ApiQueryUserInfo, ApiQueryLinks, ApiQueryCategories, ApiMove, ApiLogin, ApiCreateAccount, ApiDelete, ApiQueryDuplicateFiles, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryAllCategories, ApiQueryProtectedTitles, ApiFeedContributions, ApiQueryExtLinksUsage, ApiBlock, ApiQueryQueryPage, ApiQueryRandom, ApiQueryImages, ApiQueryIWLinks, ApiQueryTags, ApiQueryWatchlistRaw, ApiOptions, ApiHelp, ApiProtect, ApiQueryPagesWithProp, ApiQueryLangLinks, ApiQueryPageProps, ApiFileRevert, ApiQueryExternalLinks, ApiComparePages, ApiImport, ApiQueryCategoryInfo, ApiWatch, ApiUndelete, ApiOpenSearch, ApiEmailUser, ApiUnblock, ApiUserrights, ApiQueryPagePropNames, ApiExpandTemplates, ApiPatrol, ApiQueryStashImageInfo, ApiRollback, ApiFormatJson, ApiTokens, ApiQueryFileRepoInfo, ApiRsd, ApiLogout, ApiDisabled, and ApiQueryDisabled.
Definition at line 531 of file ApiBase.php.
Referenced by getFinalParams().
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 262 of file ApiBase.php.
ApiBase::getDB | ( | ) | [protected] |
Gets a default slave database connection object.
Reimplemented in ApiPageSet, ApiQueryBase, and ApiQueryAllImages.
Definition at line 1789 of file ApiBase.php.
References profileDBIn(), profileDBOut(), and wfGetDB().
Referenced by ApiProtect\execute(), and ApiBlock\execute().
ApiBase::getDescription | ( | ) | [protected] |
Returns the description string for this module.
Reimplemented in ApiMain, ApiQueryInfo, ApiQueryRevisions, ApiUpload, ApiQueryRecentChanges, ApiQueryImageInfo, ApiQuerySiteinfo, ApiQuery, ApiParse, ApiQueryWatchlist, ApiQueryLogEvents, ApiQueryContributions, ApiQueryBacklinks, ApiEditPage, ApiQueryAllUsers, ApiQueryBlocks, ApiQueryCategoryMembers, ApiQueryUsers, ApiQueryDeletedrevs, ApiQuerySearch, ApiQueryAllImages, ApiQueryFilearchive, ApiParamInfo, ApiQueryAllPages, ApiFormatBase, ApiQueryAllLinks, ApiQueryUserInfo, ApiQueryAllMessages, ApiMove, ApiSetNotificationTimestamp, ApiFeedWatchlist, ApiQueryExtLinksUsage, ApiLogin, ApiQueryCategories, ApiQueryProtectedTitles, ApiQueryLinks, ApiFormatXml, ApiDelete, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryAllCategories, ApiBlock, ApiPurge, ApiQueryWatchlistRaw, ApiImageRotate, ApiQueryDuplicateFiles, ApiQueryQueryPage, ApiProtect, ApiFeedContributions, ApiQueryTags, ApiOptions, ApiQueryImages, ApiQueryIWLinks, ApiQueryRandom, ApiQueryPagesWithProp, ApiQueryLangLinks, ApiFileRevert, ApiCreateAccount, ApiComparePages, ApiQueryExternalLinks, ApiHelp, ApiImport, ApiQueryPageProps, ApiUndelete, ApiQueryCategoryInfo, ApiEmailUser, ApiWatch, ApiQueryStashImageInfo, ApiUnblock, ApiRollback, ApiOpenSearch, ApiUserrights, ApiPatrol, ApiExpandTemplates, ApiFormatWddx, ApiQueryFileRepoInfo, ApiQueryPagePropNames, ApiTokens, ApiFormatJson, ApiRsd, ApiLogout, ApiDisabled, ApiQueryDisabled, ApiFormatDump, ApiFormatDbg, ApiFormatTxt, ApiFormatPhp, ApiFormatNone, and ApiFormatYaml.
Definition at line 507 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, ApiUpload, ApiQueryRevisions, ApiQueryRecentChanges, ApiQueryImageInfo, ApiParse, ApiQuery, ApiQuerySiteinfo, ApiEditPage, ApiQueryWatchlist, ApiQueryLogEvents, ApiQueryContributions, ApiQueryBacklinks, ApiQueryAllUsers, ApiQueryBlocks, ApiQueryDeletedrevs, ApiQueryCategoryMembers, ApiQueryUsers, ApiQueryAllImages, ApiQuerySearch, ApiQueryFilearchive, ApiParamInfo, ApiQueryAllPages, ApiQueryAllLinks, ApiFormatBase, ApiQueryUserInfo, ApiMove, ApiQueryAllMessages, ApiSetNotificationTimestamp, ApiCreateAccount, ApiLogin, ApiFeedWatchlist, ApiQueryExtLinksUsage, ApiQueryCategories, ApiQueryProtectedTitles, ApiDelete, ApiBlock, ApiQueryLangBacklinks, ApiQueryLinks, ApiQueryIWBacklinks, ApiImageRotate, ApiQueryAllCategories, ApiProtect, ApiPurge, ApiQueryWatchlistRaw, ApiQueryQueryPage, ApiOptions, ApiFeedContributions, ApiQueryDuplicateFiles, ApiRollback, ApiQueryIWLinks, ApiQueryTags, ApiFileRevert, ApiQueryImages, ApiQueryRandom, ApiQueryLangLinks, ApiQueryPagesWithProp, ApiImport, ApiComparePages, ApiUndelete, ApiQueryExternalLinks, ApiHelp, ApiUnblock, ApiEmailUser, ApiQueryPageProps, ApiQueryCategoryInfo, ApiWatch, ApiPatrol, ApiQueryStashImageInfo, ApiUserrights, ApiOpenSearch, ApiExpandTemplates, ApiQueryFileRepoInfo, ApiQueryPagePropNames, ApiTokens, ApiRsd, ApiLogout, ApiDisabled, and ApiQueryDisabled.
Definition at line 515 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 624 of file ApiBase.php.
References array(), getDescription(), and wfRunHooks().
Referenced by makeHelpMsg().
Get final parameter descriptions, after hooks have had a chance to tweak it as needed.
Definition at line 567 of file ApiBase.php.
References array(), getParamDescription(), and wfRunHooks().
Referenced by makeHelpMsgParameters().
ApiBase::getFinalParams | ( | $ | flags = 0 | ) |
Get final list of parameters, after hooks have had a chance to tweak it as needed.
int | $flags | Zero or more flags like GET_VALUES_FOR_HELP |
Definition at line 555 of file ApiBase.php.
References $flags, $params, array(), getAllowedParams(), and wfRunHooks().
Referenced by extractRequestParams(), getParameter(), getPossibleErrors(), and makeHelpMsgParameters().
Get final list of possible errors, after hooks have had a chance to tweak it as needed.
Definition at line 1656 of file ApiBase.php.
References array(), getPossibleErrors(), and wfRunHooks().
Referenced by ApiPurge\getPossibleErrors(), and ApiQuery\getPossibleErrors().
Get final possible result properties, after hooks have had a chance to tweak it as needed.
Definition at line 599 of file ApiBase.php.
References array(), getResultProperties(), and wfRunHooks().
Reimplemented in ApiQueryInfo, ApiQueryRevisions, ApiUpload, ApiQueryRecentChanges, ApiQueryImageInfo, ApiParse, ApiQuery, ApiQuerySiteinfo, ApiEditPage, ApiQueryWatchlist, ApiQueryBacklinks, ApiQueryLogEvents, ApiQueryContributions, ApiQueryAllUsers, ApiQueryBlocks, ApiQueryDeletedrevs, ApiQueryCategoryMembers, ApiQueryAllImages, ApiQueryUsers, ApiQuerySearch, ApiQueryFilearchive, ApiQueryAllPages, ApiParamInfo, ApiQueryAllLinks, ApiFormatBase, ApiQueryUserInfo, ApiMove, ApiQueryAllMessages, ApiSetNotificationTimestamp, ApiCreateAccount, ApiLogin, ApiFeedWatchlist, ApiQueryCategories, ApiQueryExtLinksUsage, ApiQueryProtectedTitles, ApiDelete, ApiQueryLinks, ApiBlock, ApiQueryLangBacklinks, ApiQueryIWBacklinks, ApiQueryAllCategories, ApiProtect, ApiPurge, ApiQueryWatchlistRaw, ApiQueryQueryPage, ApiQueryDuplicateFiles, ApiOptions, ApiRollback, ApiQueryIWLinks, ApiQueryTags, ApiQueryImages, ApiQueryLangLinks, ApiQueryRandom, ApiQueryPagesWithProp, ApiImport, ApiUndelete, ApiQueryExternalLinks, ApiHelp, ApiUnblock, ApiEmailUser, ApiQueryPageProps, ApiWatch, ApiQueryCategoryInfo, ApiPatrol, ApiUserrights, ApiOpenSearch, ApiExpandTemplates, ApiQueryPagePropNames, and ApiLogout.
Definition at line 1593 of file ApiBase.php.
Referenced by makeHelpMsg().
ApiBase::getMain | ( | ) |
Get the main module.
Definition at line 174 of file ApiBase.php.
Referenced by ApiParamInfo\__construct(), ApiQueryBase\__construct(), ApiCreateAccount\execute(), ApiExpandTemplates\execute(), ApiHelp\execute(), ApiQueryDeletedrevs\execute(), ApiUpload\execute(), ApiParamInfo\execute(), ApiOpenSearch\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(), ApiFeedWatchlist\getWatchlistModule(), ApiFormatBase\initPrinter(), profileDBOut(), and validateLimit().
Get the module manager, or null if this module has no sub-modules.
Reimplemented in ApiMain, and ApiQuery.
Definition at line 143 of file ApiBase.php.
Get the name of the module being executed by this instance.
Definition at line 134 of file ApiBase.php.
Referenced by ApiQueryBase\addPageSubItem(), ApiQueryBase\addPageSubItems(), ApiQueryTags\doTag(), ApiComparePages\execute(), ApiProtect\execute(), ApiTokens\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiMove\execute(), ApiWatch\execute(), ApiQueryStashImageInfo\execute(), ApiImport\execute(), ApiUserrights\execute(), ApiExpandTemplates\execute(), ApiPatrol\execute(), ApiEditPage\execute(), ApiSetNotificationTimestamp\execute(), ApiHelp\execute(), ApiUpload\execute(), ApiOptions\execute(), ApiQueryDeletedrevs\execute(), ApiQueryAllMessages\execute(), ApiUnblock\execute(), ApiFileRevert\execute(), ApiQueryFilearchive\execute(), ApiQueryUserInfo\execute(), ApiRollback\execute(), ApiParamInfo\execute(), ApiBlock\execute(), ApiQueryBlocks\execute(), ApiDelete\execute(), ApiQueryContributions\execute(), ApiQueryLogEvents\execute(), ApiQueryPagePropNames\execute(), ApiQueryTags\execute(), ApiQueryAllUsers\execute(), ApiImageRotate\execute(), ApiPurge\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\execute(), ApiQueryLinks\getExamples(), ApiFormatBase\getExamples(), ApiQueryAllLinks\getExamples(), ApiQueryAllLinks\getHelpUrls(), getParameterFromSettings(), ApiQueryAllLinks\getPossibleErrors(), getPossibleErrors(), ApiQueryLangBacklinks\run(), ApiQueryIWBacklinks\run(), ApiQueryProtectedTitles\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryCategoryMembers\run(), ApiQueryAllCategories\run(), ApiQueryPagesWithProp\run(), ApiQueryWatchlist\run(), ApiQuerySearch\run(), ApiQueryAllPages\run(), ApiQueryQueryPage\run(), ApiQueryAllImages\run(), ApiQueryAllLinks\run(), ApiQueryRandom\run(), ApiQueryRecentChanges\run(), ApiQueryRandom\runQuery(), ApiQueryBase\setContinueEnumParameter(), and setWarning().
Get parameter prefix (usually two letters or an empty string).
Definition at line 151 of file ApiBase.php.
Referenced by ApiQueryBase\addPageSubItem(), ApiQueryBase\addPageSubItems(), ApiQueryStashImageInfo\execute(), ApiQueryDeletedrevs\getDescription(), ApiQueryAllLinks\getExamples(), ApiQueryFileRepoInfo\getParamDescription(), ApiUnblock\getParamDescription(), ApiQueryStashImageInfo\getParamDescription(), ApiQueryExternalLinks\getParamDescription(), ApiProtect\getParamDescription(), ApiQueryProtectedTitles\getParamDescription(), ApiCreateAccount\getParamDescription(), ApiDelete\getParamDescription(), ApiQueryExtLinksUsage\getParamDescription(), ApiMove\getParamDescription(), ApiQueryAllLinks\getParamDescription(), ApiQueryAllPages\getParamDescription(), ApiQueryBlocks\getParamDescription(), ApiQueryCategoryMembers\getParamDescription(), ApiQueryAllImages\getParamDescription(), ApiQueryDeletedrevs\getParamDescription(), ApiQueryContributions\getParamDescription(), ApiQueryWatchlist\getParamDescription(), ApiQueryLogEvents\getParamDescription(), ApiQueryImageInfo\getParamDescription(), ApiEditPage\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 162 of file ApiBase.php.
Referenced by profileDBIn(), profileDBOut(), profileIn(), and profileOut().
ApiBase::getParamDescription | ( | ) | [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, ApiUpload, ApiQueryRevisions, ApiQuery, ApiQuerySiteinfo, ApiParse, ApiQueryRecentChanges, ApiEditPage, ApiQueryImageInfo, ApiQueryBacklinks, ApiQueryLogEvents, ApiQueryWatchlist, ApiQueryContributions, ApiQueryAllUsers, ApiQueryDeletedrevs, ApiParamInfo, ApiQueryAllImages, ApiQueryCategoryMembers, ApiQueryBlocks, ApiQueryUsers, ApiQueryAllPages, ApiQuerySearch, ApiQueryAllLinks, ApiQueryFilearchive, ApiQueryORM, ApiFeedWatchlist, ApiQueryAllMessages, ApiFormatXml, ApiMove, ApiQueryCategories, ApiQueryUserInfo, ApiSetNotificationTimestamp, ApiQueryLinks, ApiQueryExtLinksUsage, ApiDelete, ApiCreateAccount, ApiImageRotate, ApiQueryProtectedTitles, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiLogin, ApiQueryAllCategories, ApiQueryDuplicateFiles, ApiFeedContributions, ApiQueryWatchlistRaw, ApiOptions, ApiProtect, ApiBlock, ApiPurge, ApiQueryImages, ApiQueryQueryPage, ApiQueryPagesWithProp, ApiQueryRandom, ApiQueryIWLinks, ApiQueryTags, ApiQueryLangLinks, ApiHelp, ApiFileRevert, ApiQueryPageProps, ApiQueryExternalLinks, ApiImport, ApiComparePages, ApiUndelete, ApiOpenSearch, ApiQueryStashImageInfo, ApiWatch, ApiUserrights, ApiEmailUser, ApiQueryCategoryInfo, ApiRollback, ApiUnblock, ApiQueryPagePropNames, ApiExpandTemplates, ApiPatrol, ApiTokens, ApiQueryFileRepoInfo, ApiFormatJson, ApiRsd, ApiLogout, ApiDisabled, and ApiQueryDisabled.
Definition at line 543 of file ApiBase.php.
Referenced by getFinalParamDescription().
ApiBase::getParameter | ( | $ | paramName, |
$ | parseLimit = true |
||
) | [protected] |
Get a value for the given parameter.
string | $paramName | Parameter name |
bool | $parseLimit | see extractRequestParams() |
Definition at line 672 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.
string | $paramName | parameter name |
array | mixed | $paramSettings | default value or an array of settings using PARAM_* constants. |
$parseLimit | Boolean: parse limit? |
Definition at line 880 of file ApiBase.php.
References $key, $value, array(), as, dieDebug(), dieUsage(), dieUsageMsg(), encodeParamName(), getMain(), getModuleName(), getResult(), getValidNamespaces(), 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(), validateTimestamp(), and validateUser().
Referenced by extractRequestParams(), and getParameter().
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, ApiQueryRevisions, ApiUpload, ApiQueryRecentChanges, ApiQueryImageInfo, ApiQuery, ApiQuerySiteinfo, ApiParse, ApiQueryWatchlist, ApiQueryBase, ApiQueryLogEvents, ApiQueryContributions, ApiQueryBacklinks, ApiEditPage, ApiQueryAllUsers, ApiQueryBlocks, ApiQueryDeletedrevs, ApiQueryCategoryMembers, ApiQuerySearch, ApiQueryAllImages, ApiQueryFilearchive, ApiQueryAllPages, ApiQueryAllLinks, ApiSetNotificationTimestamp, ApiMove, ApiLogin, ApiFeedWatchlist, ApiQueryAllMessages, ApiQueryExtLinksUsage, ApiQueryCategories, ApiCreateAccount, ApiDelete, ApiQueryLangBacklinks, ApiQueryIWBacklinks, ApiBlock, ApiImageRotate, ApiPurge, ApiQueryWatchlistRaw, ApiQueryQueryPage, ApiProtect, ApiFeedContributions, ApiOptions, ApiQueryIWLinks, ApiQueryLangLinks, ApiFileRevert, ApiComparePages, ApiImport, ApiQueryExternalLinks, ApiUndelete, ApiEmailUser, ApiRollback, ApiWatch, ApiUnblock, ApiPatrol, and ApiExpandTemplates.
Definition at line 1605 of file ApiBase.php.
References $params, $ret, array(), as, getFinalParams(), getModuleName(), isReadMode(), isWriteMode(), mustBePosted(), needsToken(), and PARAM_REQUIRED.
Referenced by getFinalPossibleErrors().
Total time the module used the database.
Definition at line 1778 of file ApiBase.php.
References dieDebug().
Total time the module was executed.
Definition at line 1729 of file ApiBase.php.
References dieDebug().
ApiBase::getRequireMaxOneParameterErrorMessages | ( | $ | params | ) |
Generates the possible error requireMaxOneParameter() can die with.
$params | array |
Definition at line 737 of file ApiBase.php.
References $params, array(), and getModulePrefix().
Referenced by ApiSetNotificationTimestamp\getPossibleErrors().
ApiBase::getRequireOnlyOneParameterErrorMessages | ( | $ | params | ) |
Generates the possible errors requireOnlyOneParameter() can die with.
$params | array |
Definition at line 703 of file ApiBase.php.
References $params, array(), and getModulePrefix().
Referenced by ApiMove\getPossibleErrors(), ApiSetNotificationTimestamp\getPossibleErrors(), ApiQueryBlocks\getPossibleErrors(), ApiUpload\getPossibleErrors(), and getTitleOrPageIdErrorMessage().
Get the result object.
Reimplemented in ApiMain.
Definition at line 191 of file ApiBase.php.
References dieDebug(), getMain(), and isMain().
Referenced by ApiQueryBase\addPageSubItem(), ApiQueryBase\addPageSubItems(), ApiQueryORM\addSerializedResults(), ApiQuerySiteinfo\appendDbReplLagInfo(), ApiQuerySiteinfo\appendExtensions(), ApiQuerySiteinfo\appendExtensionTags(), ApiQuerySiteinfo\appendFileExtensions(), ApiQuerySiteinfo\appendFunctionHooks(), ApiQuerySiteinfo\appendGeneralInfo(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendLanguages(), ApiQuerySiteinfo\appendMagicWords(), ApiQuerySiteinfo\appendNamespaceAliases(), ApiQuerySiteinfo\appendNamespaces(), ApiQuerySiteinfo\appendProtocols(), ApiQuerySiteinfo\appendRightsInfo(), ApiQuerySiteinfo\appendSkins(), ApiQuerySiteinfo\appendSpecialPageAliases(), ApiQuerySiteinfo\appendStatistics(), ApiQuerySiteinfo\appendSubscribedHooks(), ApiQuerySiteinfo\appendUserGroups(), ApiQuerySiteinfo\appendVariables(), ApiComparePages\execute(), ApiCreateAccount\execute(), ApiProtect\execute(), ApiTokens\execute(), ApiUndelete\execute(), ApiMove\execute(), ApiEmailUser\execute(), ApiImport\execute(), ApiQueryStashImageInfo\execute(), ApiRsd\execute(), ApiWatch\execute(), ApiUserrights\execute(), ApiEditPage\execute(), ApiExpandTemplates\execute(), ApiSetNotificationTimestamp\execute(), ApiPatrol\execute(), ApiHelp\execute(), ApiUnblock\execute(), ApiQueryDeletedrevs\execute(), ApiOptions\execute(), ApiUpload\execute(), ApiQueryAllMessages\execute(), ApiFileRevert\execute(), ApiQueryFilearchive\execute(), ApiQueryUserInfo\execute(), ApiRollback\execute(), ApiQueryPageProps\execute(), ApiBlock\execute(), ApiFeedContributions\execute(), ApiParamInfo\execute(), ApiQueryBlocks\execute(), ApiDelete\execute(), ApiQueryPagePropNames\execute(), ApiQueryLogEvents\execute(), ApiQueryContributions\execute(), ApiQueryImageInfo\execute(), ApiQueryTags\execute(), ApiOpenSearch\execute(), ApiQueryFileRepoInfo\execute(), ApiQueryAllUsers\execute(), ApiLogin\execute(), ApiFeedWatchlist\execute(), ApiImageRotate\execute(), ApiPurge\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\execute(), ApiQueryInfo\execute(), ApiQueryInfo\extractPageInfo(), ApiQueryWatchlist\extractRowInfo(), ApiQueryContributions\extractRowInfo(), ApiQueryLogEvents\extractRowInfo(), ApiQueryRecentChanges\extractRowInfo(), ApiQueryRevisions\extractRowInfo(), ApiRsd\formatRsdApiList(), ApiQueryUserInfo\getCurrentUserInfo(), getParameterFromSettings(), getResultData(), ApiQueryLangBacklinks\run(), ApiQueryIWBacklinks\run(), ApiQueryProtectedTitles\run(), ApiQueryWatchlistRaw\run(), ApiQueryExtLinksUsage\run(), ApiQueryAllCategories\run(), ApiQueryCategoryMembers\run(), ApiQueryPagesWithProp\run(), ApiQueryWatchlist\run(), ApiQuerySearch\run(), ApiQueryAllPages\run(), ApiQueryQueryPage\run(), ApiQueryAllImages\run(), ApiQueryAllLinks\run(), ApiQueryRandom\run(), ApiQueryRecentChanges\run(), ApiQueryRandom\runQuery(), ApiQueryBase\setContinueEnumParameter(), ApiQueryORM\setIndexedTagNames(), setWarning(), and ApiUpload\transformWarnings().
Get the result data array (read-only)
Definition at line 204 of file ApiBase.php.
References getResult().
Referenced by ApiFormatPhp\execute(), ApiFormatWddx\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 function directly: use getFinalResultProperties() to allow hooks to modify descriptions as needed.
Reimplemented in ApiQueryInfo, ApiUpload, ApiQueryRevisions, ApiQueryImageInfo, ApiQueryRecentChanges, ApiEditPage, ApiQueryBacklinks, ApiQueryWatchlist, ApiQueryLogEvents, ApiQueryContributions, ApiQueryAllUsers, ApiQueryDeletedrevs, ApiQueryCategoryMembers, ApiQueryAllImages, ApiQueryBlocks, ApiQueryUsers, ApiQueryAllPages, ApiQuerySearch, ApiQueryAllLinks, ApiQueryFilearchive, ApiQueryAllMessages, ApiQueryExtLinksUsage, ApiQueryUserInfo, ApiMove, ApiQueryCategories, ApiSetNotificationTimestamp, ApiQueryLinks, ApiDelete, ApiQueryProtectedTitles, ApiCreateAccount, ApiQueryIWBacklinks, ApiQueryLangBacklinks, ApiQueryAllCategories, ApiLogin, ApiQueryWatchlistRaw, ApiQueryDuplicateFiles, ApiProtect, ApiBlock, ApiPurge, ApiQueryImages, ApiQueryTags, ApiQueryQueryPage, ApiQueryIWLinks, ApiQueryRandom, ApiQueryLangLinks, ApiOptions, ApiFileRevert, ApiQueryExternalLinks, ApiImport, ApiComparePages, ApiUndelete, ApiQueryStashImageInfo, ApiWatch, ApiRollback, ApiEmailUser, ApiQueryCategoryInfo, ApiUnblock, ApiExpandTemplates, ApiPatrol, ApiTokens, and ApiLogout.
Definition at line 589 of file ApiBase.php.
Referenced by getFinalResultProperties().
ApiBase::getTitleOrPageId | ( | $ | params, |
$ | load = false |
||
) |
$params | array | |
bool | string | $load | Whether load the object's state from the database:
|
Definition at line 754 of file ApiBase.php.
References $params, array(), dieUsage(), dieUsageMsg(), WikiPage\factory(), WikiPage\newFromID(), Title\newFromText(), and requireOnlyOneParameter().
Referenced by ApiProtect\execute(), ApiEditPage\execute(), ApiDelete\execute(), and ApiQueryCategoryMembers\run().
Definition at line 786 of file ApiBase.php.
References array(), and getRequireOnlyOneParameterErrorMessages().
Referenced by ApiProtect\getPossibleErrors(), ApiDelete\getPossibleErrors(), ApiQueryCategoryMembers\getPossibleErrors(), and ApiEditPage\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, ApiImageRotate, ApiOptions, ApiSetNotificationTimestamp, ApiFileRevert, ApiImport, ApiUndelete, ApiRollback, ApiUnblock, ApiEmailUser, ApiPatrol, ApiUserrights, and ApiWatch.
Definition at line 1558 of file ApiBase.php.
static ApiBase::getValidNamespaces | ( | ) | [static] |
Definition at line 811 of file ApiBase.php.
References wfDeprecated().
Referenced by getParameterFromSettings().
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.
Definition at line 125 of file ApiBase.php.
References wfDeprecated().
ApiBase::getWatchlistUser | ( | $ | params | ) |
Gets the user for whom to get the watchlist.
$params | array |
Definition at line 1568 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.
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 magically default to either watchdefault or watchcreations |
Definition at line 824 of file ApiBase.php.
References ContextSource\getUser(), and WatchedItem\IGNORE_USER_RIGHTS.
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 183 of file ApiBase.php.
Referenced by __construct(), and getResult().
Indicates whether this module requires read rights.
Reimplemented in ApiMain, ApiParamInfo, ApiLogin, ApiCreateAccount, ApiHelp, ApiLogout, and ApiDisabled.
Definition at line 1521 of file ApiBase.php.
Referenced by getPossibleErrors(), and makeHelpMsg().
Indicates whether this module requires write mode.
Reimplemented in ApiUpload, ApiEditPage, ApiSetNotificationTimestamp, ApiMove, ApiImageRotate, ApiCreateAccount, ApiDelete, ApiPurge, ApiBlock, ApiOptions, ApiProtect, ApiFileRevert, ApiImport, ApiUndelete, ApiWatch, ApiEmailUser, ApiUnblock, ApiUserrights, ApiPatrol, and ApiRollback.
Definition at line 1528 of file ApiBase.php.
Referenced by getPossibleErrors(), and makeHelpMsg().
ApiBase::makeHelpArrayToString | ( | $ | prefix, |
$ | title, | ||
$ | input | ||
) | [protected] |
string | $prefix | Text to split output items |
string | $title | What is being output |
$input | string|array |
Definition at line 347 of file ApiBase.php.
References $title, and array().
Referenced by makeHelpMsg().
Generates help message for this module, or false if there is no description.
Reimplemented in ApiMain, and ApiQuery.
Definition at line 270 of file ApiBase.php.
References array(), as, getExamples(), getFinalDescription(), getHelpUrls(), isReadMode(), isWriteMode(), makeHelpArrayToString(), makeHelpMsgParameters(), and mustBePosted().
Generates the parameter descriptions for this module, to be displayed in the module's help.
Definition at line 372 of file ApiBase.php.
References $params, $s, $t, array(), as, encodeParamName(), GET_VALUES_FOR_HELP, 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, ApiSetNotificationTimestamp, ApiMove, ApiImageRotate, ApiLogin, ApiDelete, ApiCreateAccount, ApiPurge, ApiBlock, ApiOptions, ApiProtect, ApiFileRevert, ApiImport, ApiUndelete, ApiWatch, ApiEmailUser, ApiUnblock, ApiUserrights, ApiPatrol, and ApiRollback.
Definition at line 1536 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, ApiImageRotate, ApiOptions, ApiSetNotificationTimestamp, ApiFileRevert, ApiImport, ApiUndelete, ApiRollback, ApiUnblock, ApiEmailUser, ApiPatrol, ApiUserrights, and ApiWatch.
Definition at line 1546 of file ApiBase.php.
Referenced by getPossibleErrors().
ApiBase::parameterNotEmpty | ( | $ | x | ) | [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 802 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 1667 of file ApiBase.php.
References $ret, array(), as, and parseMsg().
ApiBase::parseMsg | ( | $ | error | ) |
Return the error message related to a certain array.
array | $error | Element of a getUserPermissionsErrors()-style array |
Definition at line 1478 of file ApiBase.php.
References $error, $key, array(), and wfMsgReplaceArgs().
Referenced by ApiImageRotate\checkPermissions(), dieReadOnly(), dieUsageMsg(), dieUsageMsgOrDebug(), 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.
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 1062 of file ApiBase.php.
References $s, $value, array(), dieUsage(), LIMIT_SML1, and setWarning().
Referenced by getParameterFromSettings().
Start module profiling.
Definition at line 1744 of file ApiBase.php.
References dieDebug(), getModuleProfileName(), and wfProfileIn().
Referenced by ApiQueryBase\checkRowCount(), getDB(), and ApiQueryBase\select().
End database profiling.
Definition at line 1758 of file ApiBase.php.
References $time, dieDebug(), getMain(), getModuleProfileName(), and wfProfileOut().
Referenced by ApiQueryBase\checkRowCount(), getDB(), safeProfileOut(), and ApiQueryBase\select().
Start module profiling.
Definition at line 1688 of file ApiBase.php.
References dieDebug(), getModuleProfileName(), and wfProfileIn().
End module profiling.
Definition at line 1699 of file ApiBase.php.
References dieDebug(), getModuleProfileName(), and wfProfileOut().
Referenced by 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 718 of file ApiBase.php.
References $params, array(), 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.
array | $params | of parameter names |
Definition at line 682 of file ApiBase.php.
References $params, array(), dieUsage(), and getModulePrefix().
Referenced by ApiMove\execute(), ApiPatrol\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 1716 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
string | $warning | Warning message |
Definition at line 229 of file ApiBase.php.
References $result, ApiResult\ADD_ON_TOP, array(), getModuleName(), getResult(), ApiResult\OVERRIDE, and ApiResult\setContent().
Referenced by ApiResult\addValue(), ApiFormatXml\addXslt(), dieUsageMsgOrDebug(), ApiTokens\execute(), ApiOptions\execute(), ApiQueryDisabled\execute(), ApiPurge\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\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.
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 862 of file ApiBase.php.
References $value, WatchAction\doWatchOrUnwatch(), 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 1513 of file ApiBase.php.
static ApiBase::truncateArray | ( | &$ | arr, |
$ | limit | ||
) | [static] |
Truncate an array to a certain length.
array | $arr | Array to truncate |
int | $limit | Maximum length |
Definition at line 1193 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.
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 1115 of file ApiBase.php.
References $value, encodeParamName(), getMain(), and warnOrDie().
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryRevisions\execute(), and getParameterFromSettings().
ApiBase::validateTimestamp | ( | $ | value, |
$ | encParamName | ||
) |
Validate and normalize of parameters of type 'timestamp'.
string | $value | Parameter value |
string | $encParamName | Parameter name |
Definition at line 1151 of file ApiBase.php.
References $value, dieUsage(), and wfTimestamp().
Referenced by getParameterFromSettings().
ApiBase::validateUser | ( | $ | value, |
$ | encParamName | ||
) | [private] |
Validate and normalize of parameters of type 'user'.
string | $value | Parameter value |
string | $encParamName | Parameter name |
Definition at line 1165 of file ApiBase.php.
References $title, $value, dieUsage(), and Title\makeTitleSafe().
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 1179 of file ApiBase.php.
References dieUsage(), and setWarning().
Referenced by validateLimit().
ApiBase::$mDBTime = 0 |
Definition at line 1739 of file ApiBase.php.
ApiBase::$mDBTimeIn = 0 [private] |
Profiling: database execution time.
Definition at line 1739 of file ApiBase.php.
ApiBase::$messageMap [static] |
Array that maps message keys to error messages.
$1 and friends are replaced.
Definition at line 1260 of file ApiBase.php.
Referenced by dieStatus().
ApiBase::$mMainModule [private] |
Definition at line 76 of file ApiBase.php.
ApiBase::$mModuleName |
Definition at line 76 of file ApiBase.php.
ApiBase::$mModulePrefix |
Definition at line 76 of file ApiBase.php.
ApiBase::$mModuleTime = 0 |
Definition at line 1683 of file ApiBase.php.
ApiBase::$mParamCache = array() [private] |
Definition at line 78 of file ApiBase.php.
ApiBase::$mSlaveDB = null [private] |
Definition at line 77 of file ApiBase.php.
ApiBase::$mTimeIn = 0 [private] |
Profiling: total module execution time.
Definition at line 1683 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 74 of file ApiBase.php.
Referenced by ApiPageSet\getAllowedParams(), and makeHelpMsgParameters().
const ApiBase::LIMIT_BIG1 = 500 |
Definition at line 64 of file ApiBase.php.
Referenced by ApiQueryDeletedrevs\execute(), ApiQueryRevisions\execute(), ApiQueryPagePropNames\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\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(), ApiQueryPagePropNames\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\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(), ApiProtect\getAllowedParams(), ApiHelp\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 ApiQueryFileRepoInfo\getAllowedParams(), ApiTokens\getAllowedParams(), ApiQueryStashImageInfo\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiQueryPagePropNames\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiFileRevert\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiProtect\getAllowedParams(), ApiOptions\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiDelete\getAllowedParams(), ApiCreateAccount\getAllowedParams(), ApiMove\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryUserInfo\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiEditPage\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 ApiQueryFileRepoInfo\getAllowedParams(), ApiTokens\getAllowedParams(), ApiQueryStashImageInfo\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiQueryPageProps\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiProtect\getAllowedParams(), ApiHelp\getAllowedParams(), ApiOptions\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQueryUserInfo\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQuery\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQuerySiteinfo\getAllowedParams(), ApiQueryInfo\getAllowedParams(), ApiPageSet\getAllowedParams(), getParameterFromSettings(), and makeHelpMsgParameters().
const ApiBase::PARAM_MAX = 3 |
Definition at line 49 of file ApiBase.php.
Referenced by ApiQueryPagePropNames\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), and getParameterFromSettings().
const ApiBase::PARAM_MAX2 = 4 |
Definition at line 50 of file ApiBase.php.
Referenced by ApiQueryPagePropNames\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), and getParameterFromSettings().
const ApiBase::PARAM_MIN = 5 |
Definition at line 51 of file ApiBase.php.
Referenced by ApiQueryPagePropNames\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\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(), ApiEmailUser\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiWatch\getAllowedParams(), ApiImport\getAllowedParams(), ApiFileRevert\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiProtect\getAllowedParams(), ApiOptions\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiBlock\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiCreateAccount\getAllowedParams(), ApiDelete\getAllowedParams(), ApiImageRotate\getAllowedParams(), ApiMove\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiUpload\getAllowedParams(), getParameterFromSettings(), and getPossibleErrors().
const ApiBase::PARAM_TYPE = 2 |
Definition at line 48 of file ApiBase.php.
Referenced by ApiQueryFileRepoInfo\getAllowedParams(), ApiTokens\getAllowedParams(), ApiPatrol\getAllowedParams(), ApiQueryStashImageInfo\getAllowedParams(), ApiExpandTemplates\getAllowedParams(), ApiQueryPagePropNames\getAllowedParams(), ApiUnblock\getAllowedParams(), ApiUserrights\getAllowedParams(), ApiEmailUser\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiUndelete\getAllowedParams(), ApiWatch\getAllowedParams(), ApiImport\getAllowedParams(), ApiComparePages\getAllowedParams(), ApiQueryExternalLinks\getAllowedParams(), ApiFileRevert\getAllowedParams(), ApiQueryLangLinks\getAllowedParams(), ApiQueryPagesWithProp\getAllowedParams(), ApiProtect\getAllowedParams(), ApiOptions\getAllowedParams(), ApiQueryWatchlistRaw\getAllowedParams(), ApiQueryTags\getAllowedParams(), ApiQueryIWLinks\getAllowedParams(), ApiQueryImages\getAllowedParams(), ApiQueryRandom\getAllowedParams(), ApiQueryQueryPage\getAllowedParams(), ApiBlock\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryAllCategories\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryIWBacklinks\getAllowedParams(), ApiQueryLangBacklinks\getAllowedParams(), ApiQueryDuplicateFiles\getAllowedParams(), ApiCreateAccount\getAllowedParams(), ApiDelete\getAllowedParams(), ApiImageRotate\getAllowedParams(), ApiMove\getAllowedParams(), ApiQueryCategories\getAllowedParams(), ApiQueryLinks\getAllowedParams(), ApiSetNotificationTimestamp\getAllowedParams(), ApiQueryUserInfo\getAllowedParams(), ApiQueryAllMessages\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryFilearchive\getAllowedParams(), ApiQueryAllLinks\getAllowedParams(), ApiQueryORM\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryUsers\getAllowedParams(), ApiQueryDeletedrevs\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryWatchlist\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryImageInfo\getAllowedParams(), ApiEditPage\getAllowedParams(), ApiQueryRecentChanges\getAllowedParams(), ApiQuery\getAllowedParams(), ApiQueryRevisions\getAllowedParams(), ApiQuerySiteinfo\getAllowedParams(), ApiUpload\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(), ApiUnblock\getResultProperties(), ApiQueryCategoryInfo\getResultProperties(), ApiEmailUser\getResultProperties(), ApiComparePages\getResultProperties(), ApiFileRevert\getResultProperties(), ApiQueryLangLinks\getResultProperties(), ApiQueryIWLinks\getResultProperties(), ApiQueryQueryPage\getResultProperties(), ApiPurge\getResultProperties(), ApiBlock\getResultProperties(), ApiQueryWatchlistRaw\getResultProperties(), ApiLogin\getResultProperties(), ApiCreateAccount\getResultProperties(), ApiQueryProtectedTitles\getResultProperties(), ApiSetNotificationTimestamp\getResultProperties(), ApiMove\getResultProperties(), ApiQueryUserInfo\getResultProperties(), ApiQueryAllMessages\getResultProperties(), ApiQueryFilearchive\getResultProperties(), ApiQuerySearch\getResultProperties(), ApiQueryUsers\getResultProperties(), ApiQueryBlocks\getResultProperties(), ApiQueryAllUsers\getResultProperties(), ApiQueryContributions\getResultProperties(), ApiQueryLogEvents\getResultProperties(), ApiQueryWatchlist\getResultProperties(), ApiEditPage\getResultProperties(), ApiQueryRecentChanges\getResultProperties(), ApiQueryRevisions\getResultProperties(), ApiUpload\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(), ApiUnblock\getResultProperties(), ApiQueryCategoryInfo\getResultProperties(), ApiEmailUser\getResultProperties(), ApiComparePages\getResultProperties(), ApiFileRevert\getResultProperties(), ApiOptions\getResultProperties(), ApiQueryLangLinks\getResultProperties(), ApiQueryIWLinks\getResultProperties(), ApiQueryQueryPage\getResultProperties(), ApiPurge\getResultProperties(), ApiBlock\getResultProperties(), ApiQueryWatchlistRaw\getResultProperties(), ApiLogin\getResultProperties(), ApiCreateAccount\getResultProperties(), ApiQueryProtectedTitles\getResultProperties(), ApiSetNotificationTimestamp\getResultProperties(), ApiMove\getResultProperties(), ApiQueryUserInfo\getResultProperties(), ApiQueryAllMessages\getResultProperties(), ApiQueryFilearchive\getResultProperties(), ApiQuerySearch\getResultProperties(), ApiQueryUsers\getResultProperties(), ApiQueryBlocks\getResultProperties(), ApiQueryCategoryMembers\getResultProperties(), ApiQueryAllUsers\getResultProperties(), ApiQueryContributions\getResultProperties(), ApiQueryLogEvents\getResultProperties(), ApiQueryWatchlist\getResultProperties(), ApiEditPage\getResultProperties(), ApiQueryRecentChanges\getResultProperties(), ApiQueryRevisions\getResultProperties(), ApiUpload\getResultProperties(), ApiQueryInfo\getResultProperties(), and ApiQueryImageInfo\getResultPropertiesFiltered().