Inherits ApiQueryBase.
Public Member Functions | |
__construct ($query, $moduleName) | |
requestExtraData ($pageSet) | |
Override this method to request extra fields from the pageSet using $pageSet->requestField('fieldName'). | |
execute () | |
Evaluates the parameters, performs the requested query, and sets up the result. | |
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. | |
getParamDescription () | |
Returns an array of parameter descriptions. | |
getDescription () | |
Returns the description string for this module. | |
getVersion () | |
Returns a string that identifies the version of the extending class. | |
Static Public Member Functions | |
static | getEditToken ($pageid, $title) |
static | getDeleteToken ($pageid, $title) |
static | getProtectToken ($pageid, $title) |
static | getMoveToken ($pageid, $title) |
static | getBlockToken ($pageid, $title) |
static | getUnblockToken ($pageid, $title) |
static | getEmailToken ($pageid, $title) |
static | getImportToken ($pageid, $title) |
Protected Member Functions | |
getTokenFunctions () | |
Get an array mapping token names to their handler functions. | |
getExamples () | |
Returns usage examples for this module. | |
Private Member Functions | |
extractPageInfo ($pageid, $title) | |
Get a result array with information about a title. | |
getProtectionInfo () | |
Get information about protections and put it in $protections. | |
getTSIDs () | |
Get talk page IDs (if requested) and subject page IDs (if requested) and put them in $talkids and $subjectids. | |
Private Attributes | |
$fld_protection = false | |
$fld_talkid = false | |
$fld_subjectid = false | |
$fld_url = false | |
$fld_readable = false |
Definition at line 36 of file ApiQueryInfo.php.
ApiQueryInfo::__construct | ( | $ | query, | |
$ | moduleName | |||
) |
Definition at line 42 of file ApiQueryInfo.php.
ApiQueryInfo::execute | ( | ) |
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 from ApiBase.
Definition at line 193 of file ApiQueryInfo.php.
References $db, $result, $title, Title::compare(), ApiBase::dieUsage(), extractPageInfo(), ApiBase::extractRequestParams(), ApiQueryBase::getDB(), ApiQueryBase::getPageSet(), getProtectionInfo(), ApiBase::getResult(), getTSIDs(), Title::makeTitleSafe(), and ApiQueryBase::setContinueEnumParameter().
ApiQueryInfo::extractPageInfo | ( | $ | pageid, | |
$ | title | |||
) | [private] |
Get a result array with information about a title.
$pageid | int Page ID (negative for missing titles) | |
$title | Title object |
Definition at line 269 of file ApiQueryInfo.php.
References $t, $title, ApiBase::getResult(), getTokenFunctions(), ApiBase::setWarning(), and wfTimestamp().
Referenced by execute().
ApiQueryInfo::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.
Reimplemented from ApiBase.
Definition at line 502 of file ApiQueryInfo.php.
References getTokenFunctions(), ApiBase::PARAM_DFLT, ApiBase::PARAM_ISMULTI, and ApiBase::PARAM_TYPE.
static ApiQueryInfo::getBlockToken | ( | $ | pageid, | |
$ | title | |||
) | [static] |
Definition at line 145 of file ApiQueryInfo.php.
References $wgUser.
Referenced by getUnblockToken().
static ApiQueryInfo::getDeleteToken | ( | $ | pageid, | |
$ | title | |||
) | [static] |
ApiQueryInfo::getDescription | ( | ) |
Returns the description string for this module.
Reimplemented from ApiBase.
Definition at line 536 of file ApiQueryInfo.php.
static ApiQueryInfo::getEditToken | ( | $ | pageid, | |
$ | title | |||
) | [static] |
static ApiQueryInfo::getEmailToken | ( | $ | pageid, | |
$ | title | |||
) | [static] |
ApiQueryInfo::getExamples | ( | ) | [protected] |
Returns usage examples for this module.
Return null if no examples are available.
Reimplemented from ApiBase.
Definition at line 540 of file ApiQueryInfo.php.
static ApiQueryInfo::getImportToken | ( | $ | pageid, | |
$ | title | |||
) | [static] |
static ApiQueryInfo::getMoveToken | ( | $ | pageid, | |
$ | title | |||
) | [static] |
ApiQueryInfo::getParamDescription | ( | ) |
Returns an array of parameter descriptions.
Don't call this functon directly: use getFinalParamDescription() to allow hooks to modify descriptions as needed.
Reimplemented from ApiBase.
Definition at line 523 of file ApiQueryInfo.php.
ApiQueryInfo::getProtectionInfo | ( | ) | [private] |
Get information about protections and put it in $protections.
Definition at line 321 of file ApiQueryInfo.php.
References $db, $lb, $res, $row, $source, $title, ApiQueryBase::addFields(), ApiQueryBase::addTables(), ApiQueryBase::addWhere(), ApiQueryBase::addWhereFld(), Block::decodeExpiry(), ApiQueryBase::getDB(), Title::makeTitle(), ApiQueryBase::resetQueryParams(), and ApiQueryBase::select().
Referenced by execute().
static ApiQueryInfo::getProtectToken | ( | $ | pageid, | |
$ | title | |||
) | [static] |
ApiQueryInfo::getTokenFunctions | ( | ) | [protected] |
Get an array mapping token names to their handler functions.
The prototype for a token function is func($pageid, $title) it should return a token or false (permission denied)
Definition at line 62 of file ApiQueryInfo.php.
References ApiBase::getMain(), and wfRunHooks().
Referenced by extractPageInfo(), and getAllowedParams().
ApiQueryInfo::getTSIDs | ( | ) | [private] |
Get talk page IDs (if requested) and subject page IDs (if requested) and put them in $talkids and $subjectids.
Definition at line 466 of file ApiQueryInfo.php.
References $db, $lb, $res, $row, $t, ApiQueryBase::addFields(), ApiQueryBase::addTables(), ApiQueryBase::addWhere(), ApiQueryBase::getDB(), MWNamespace::getSubject(), MWNamespace::getTalk(), MWNamespace::isTalk(), ApiQueryBase::resetQueryParams(), and ApiQueryBase::select().
Referenced by execute().
static ApiQueryInfo::getUnblockToken | ( | $ | pageid, | |
$ | title | |||
) | [static] |
ApiQueryInfo::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 from ApiBase.
Definition at line 547 of file ApiQueryInfo.php.
ApiQueryInfo::requestExtraData | ( | $ | pageSet | ) |
Override this method to request extra fields from the pageSet using $pageSet->requestField('fieldName').
$pageSet | ApiPageSet |
Reimplemented from ApiQueryBase.
Definition at line 46 of file ApiQueryInfo.php.
ApiQueryInfo::$fld_protection = false [private] |
Definition at line 38 of file ApiQueryInfo.php.
ApiQueryInfo::$fld_readable = false [private] |
Definition at line 40 of file ApiQueryInfo.php.
ApiQueryInfo::$fld_subjectid = false [private] |
Definition at line 39 of file ApiQueryInfo.php.
ApiQueryInfo::$fld_talkid = false [private] |
Definition at line 38 of file ApiQueryInfo.php.
ApiQueryInfo::$fld_url = false [private] |
Definition at line 39 of file ApiQueryInfo.php.