Inherits ApiBase.
Inherited by ApiPageSet, ApiQueryAllmessages, ApiQueryAllUsers, ApiQueryBlocks, ApiQueryCategoryInfo, ApiQueryContributions, ApiQueryDeletedrevs, ApiQueryDisabled, ApiQueryExternalLinks, ApiQueryGeneratorBase, ApiQueryImageInfo, ApiQueryInfo, ApiQueryLangLinks, ApiQueryLogEvents, ApiQueryRecentChanges, ApiQueryRevisions, ApiQuerySiteinfo, ApiQueryUserInfo, and ApiQueryUsers.
Public Member Functions | |
__construct ($query, $moduleName, $paramPrefix= '') | |
Constructor. | |
requestExtraData ($pageSet) | |
Override this method to request extra fields from the pageSet using $pageSet->requestField('fieldName'). | |
getQuery () | |
Get the main Query module. | |
selectNamedDB ($name, $db, $groups) | |
Selects the query database connection with the given name. | |
titleToKey ($title) | |
Convert a title to a DB key. | |
keyToTitle ($key) | |
The inverse of titleToKey(). | |
titlePartToKey ($titlePart) | |
An alternative to titleToKey() that doesn't trim trailing spaces. | |
keyPartToTitle ($keyPart) | |
An alternative to keyToTitle() that doesn't trim trailing spaces. | |
Static Public Member Functions | |
static | addTitleInfo (&$arr, $title, $prefix='') |
Add information (title and namespace) about a Title object to a result array. | |
static | getBaseVersion () |
Get version string for use in the API help output. | |
Protected Member Functions | |
resetQueryParams () | |
Blank the internal arrays with query parameters. | |
addTables ($tables, $alias=null) | |
Add a set of tables to the internal array. | |
getAliasedName ($table, $alias) | |
Get the SQL for a table name with alias. | |
addJoinConds ($join_conds) | |
Add a set of JOIN conditions to the internal array. | |
addFields ($value) | |
Add a set of fields to select to the internal array. | |
addFieldsIf ($value, $condition) | |
Same as addFields(), but add the fields only if a condition is met. | |
addWhere ($value) | |
Add a set of WHERE clauses to the internal array. | |
addWhereIf ($value, $condition) | |
Same as addWhere(), but add the WHERE clauses only if a condition is met. | |
addWhereFld ($field, $value) | |
Equivalent to addWhere(array($field => $value)). | |
addWhereRange ($field, $dir, $start, $end, $sort=true) | |
Add a WHERE clause corresponding to a range, and an ORDER BY clause to sort in the right direction. | |
addOption ($name, $value=null) | |
Add an option such as LIMIT or USE INDEX. | |
select ($method) | |
Execute a SELECT query based on the values in the internal arrays. | |
checkRowCount () | |
Estimate the row count for the SELECT query that would be run if we called select() right now, and check if it's acceptable. | |
addPageSubItems ($pageId, $data) | |
Add a sub-element under the page element with the given page ID. | |
addPageSubItem ($pageId, $item, $elemname=null) | |
Same as addPageSubItems(), but one element of $data at a time. | |
setContinueEnumParameter ($paramName, $paramValue) | |
Set a query-continue value. | |
getDB () | |
Get the Query database connection (read-only). | |
getPageSet () | |
Get the PageSet object to work on. | |
Private Attributes | |
$mQueryModule | |
$mDb | |
$tables | |
$where | |
$fields | |
$options | |
$join_conds |
It provides some common functionality such as constructing various SQL queries.
Definition at line 38 of file ApiQueryBase.php.
ApiQueryBase::__construct | ( | $ | mainModule, | |
$ | moduleName, | |||
$ | modulePrefix = '' | |||
) |
Constructor.
$mainModule | ApiMain object | |
$moduleName | string Name of this module | |
$modulePrefix | string Prefix to use for parameter names |
Reimplemented from ApiBase.
Reimplemented in ApiQueryGeneratorBase.
Definition at line 42 of file ApiQueryBase.php.
References resetQueryParams().
ApiQueryBase::addFields | ( | $ | value | ) | [protected] |
Add a set of fields to select to the internal array.
$value | mixed Field name or array of field names |
Definition at line 107 of file ApiQueryBase.php.
Referenced by addFieldsIf(), ApiQuerySiteinfo::appendInterwikiMap(), ApiQueryUsers::execute(), ApiQueryRevisions::execute(), ApiQueryRecentChanges::execute(), ApiQueryLogEvents::execute(), ApiQueryLangLinks::execute(), ApiQueryExternalLinks::execute(), ApiQueryDeletedrevs::execute(), ApiQueryCategoryInfo::execute(), ApiQueryBlocks::execute(), ApiQueryAllUsers::execute(), ApiQueryInfo::getProtectionInfo(), ApiQueryInfo::getTSIDs(), ApiQueryBacklinks::prepareFirstQuery(), ApiQueryContributions::prepareQuery(), ApiQueryRandom::prepareQuery(), ApiQueryBacklinks::prepareSecondQuery(), ApiQueryWatchlistRaw::run(), ApiQueryWatchlist::run(), ApiQueryProtectedTitles::run(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryExtLinksUsage::run(), ApiQueryDuplicateFiles::run(), ApiQueryCategoryMembers::run(), ApiQueryCategories::run(), ApiQueryAllpages::run(), ApiQueryAllLinks::run(), ApiQueryAllimages::run(), and ApiQueryAllCategories::run().
ApiQueryBase::addFieldsIf | ( | $ | value, | |
$ | condition | |||
) | [protected] |
Same as addFields(), but add the fields only if a condition is met.
$value | mixed See addFields() | |
$condition | bool If false, do nothing |
Definition at line 120 of file ApiQueryBase.php.
References addFields().
Referenced by ApiQueryRecentChanges::execute(), ApiQueryLogEvents::execute(), ApiQueryAllUsers::execute(), ApiQueryContributions::prepareQuery(), ApiQueryWatchlistRaw::run(), ApiQueryWatchlist::run(), ApiQueryProtectedTitles::run(), ApiQueryExtLinksUsage::run(), ApiQueryCategoryMembers::run(), ApiQueryAllLinks::run(), and ApiQueryAllCategories::run().
ApiQueryBase::addJoinConds | ( | $ | join_conds | ) | [protected] |
Add a set of JOIN conditions to the internal array.
JOIN conditions are formatted as array( tablename => array(jointype, conditions) e.g. array('page' => array('LEFT JOIN', 'page_id=rev_page')) . conditions may be a string or an addWhere()-style array
$join_conds | array JOIN conditions |
Definition at line 97 of file ApiQueryBase.php.
References $join_conds, and ApiBase::dieDebug().
Referenced by ApiQueryUsers::execute(), ApiQueryRecentChanges::execute(), ApiQueryLogEvents::execute(), ApiQueryCategoryInfo::execute(), ApiQueryAllUsers::execute(), ApiQueryContributions::prepareQuery(), ApiQueryProtectedTitles::run(), ApiQueryCategories::run(), ApiQueryAllpages::run(), and ApiQueryAllCategories::run().
ApiQueryBase::addOption | ( | $ | name, | |
$ | value = null | |||
) | [protected] |
Add an option such as LIMIT or USE INDEX.
If an option was set before, the old value will be overwritten
$name | string Option name | |
$value | string Option value |
Definition at line 215 of file ApiQueryBase.php.
References $name.
Referenced by addWhereRange(), ApiQuerySiteinfo::appendInterwikiMap(), ApiQueryRevisions::execute(), ApiQueryRecentChanges::execute(), ApiQueryLogEvents::execute(), ApiQueryLangLinks::execute(), ApiQueryExternalLinks::execute(), ApiQueryDeletedrevs::execute(), ApiQueryCategoryInfo::execute(), ApiQueryBlocks::execute(), ApiQueryAllUsers::execute(), ApiQueryBacklinks::prepareFirstQuery(), ApiQueryContributions::prepareQuery(), ApiQueryRandom::prepareQuery(), ApiQueryBacklinks::prepareSecondQuery(), ApiQueryWatchlistRaw::run(), ApiQueryWatchlist::run(), ApiQueryProtectedTitles::run(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryExtLinksUsage::run(), ApiQueryDuplicateFiles::run(), ApiQueryCategoryMembers::run(), ApiQueryCategories::run(), ApiQueryAllpages::run(), ApiQueryAllLinks::run(), ApiQueryAllimages::run(), and ApiQueryAllCategories::run().
ApiQueryBase::addPageSubItem | ( | $ | pageId, | |
$ | item, | |||
$ | elemname = null | |||
) | [protected] |
Same as addPageSubItems(), but one element of $data at a time.
$pageId | int Page ID | |
$data | array Data array à la ApiResult | |
$elemname | string XML element name. If null, getModuleName() is used |
Definition at line 307 of file ApiQueryBase.php.
References $result, ApiBase::getModuleName(), ApiBase::getModulePrefix(), and ApiBase::getResult().
Referenced by ApiQueryRevisions::execute(), ApiQueryLangLinks::execute(), ApiQueryImageInfo::execute(), ApiQueryExternalLinks::execute(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryDuplicateFiles::run(), and ApiQueryCategories::run().
ApiQueryBase::addPageSubItems | ( | $ | pageId, | |
$ | data | |||
) | [protected] |
Add a sub-element under the page element with the given page ID.
$pageId | int Page ID | |
$data | array Data array à la ApiResult |
Definition at line 291 of file ApiQueryBase.php.
References $result, ApiBase::getModuleName(), ApiBase::getModulePrefix(), and ApiBase::getResult().
Referenced by ApiQueryCategoryInfo::execute().
ApiQueryBase::addTables | ( | $ | tables, | |
$ | alias = null | |||
) | [protected] |
Add a set of tables to the internal array.
$tables | mixed Table name or array of table names | |
$alias | mixed Table alias, or null for no alias. Cannot be used with multiple tables |
Definition at line 66 of file ApiQueryBase.php.
References $tables, ApiBase::dieDebug(), and getAliasedName().
Referenced by ApiQuerySiteinfo::appendInterwikiMap(), ApiQueryUsers::execute(), ApiQueryRevisions::execute(), ApiQueryRecentChanges::execute(), ApiQueryLogEvents::execute(), ApiQueryLangLinks::execute(), ApiQueryExternalLinks::execute(), ApiQueryDeletedrevs::execute(), ApiQueryCategoryInfo::execute(), ApiQueryBlocks::execute(), ApiQueryAllUsers::execute(), ApiQueryInfo::getProtectionInfo(), ApiQueryInfo::getTSIDs(), ApiQueryBacklinks::prepareFirstQuery(), ApiQueryContributions::prepareQuery(), ApiQueryRandom::prepareQuery(), ApiQueryBacklinks::prepareSecondQuery(), ApiQueryWatchlistRaw::run(), ApiQueryWatchlist::run(), ApiQueryProtectedTitles::run(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryExtLinksUsage::run(), ApiQueryDuplicateFiles::run(), ApiQueryCategoryMembers::run(), ApiQueryCategories::run(), ApiQueryAllpages::run(), ApiQueryAllLinks::run(), ApiQueryAllimages::run(), and ApiQueryAllCategories::run().
static ApiQueryBase::addTitleInfo | ( | &$ | arr, | |
$ | title, | |||
$ | prefix = '' | |||
) | [static] |
Add information (title and namespace) about a Title object to a result array.
Definition at line 264 of file ApiQueryBase.php.
References $prefix, and $title.
Referenced by ApiQueryLogEvents::addLogParams(), ApiQueryDeletedrevs::execute(), ApiPurge::execute(), ApiPatrol::execute(), ApiQueryBacklinks::extractRedirRowInfo(), ApiQueryWatchlist::extractRowInfo(), ApiQueryContributions::extractRowInfo(), ApiQueryRecentChanges::extractRowInfo(), ApiQueryRandom::extractRowInfo(), ApiQueryLogEvents::extractRowInfo(), ApiQueryBacklinks::extractRowInfo(), ApiQuery::outputGeneralPageInfo(), ApiImportReporter::reportPage(), ApiQueryWatchlistRaw::run(), ApiQuerySearch::run(), ApiQueryProtectedTitles::run(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryExtLinksUsage::run(), ApiQueryCategoryMembers::run(), ApiQueryCategories::run(), and ApiQueryAllLinks::run().
ApiQueryBase::addWhere | ( | $ | value | ) | [protected] |
Add a set of WHERE clauses to the internal array.
Clauses can be formatted as 'foo=bar' or array('foo' => 'bar'), the latter only works if the value is a constant (i.e. not another field)
If $value is an empty array, this function does nothing.
For example, array('foo=bar', 'baz' => 3, 'bla' => 'foo') translates to "foo=bar AND baz='3' AND bla='foo'"
$value | mixed String or array |
Definition at line 139 of file ApiQueryBase.php.
Referenced by addWhereIf(), addWhereRange(), ApiQuerySiteinfo::appendInterwikiMap(), ApiQueryRevisions::execute(), ApiQueryLogEvents::execute(), ApiQueryLangLinks::execute(), ApiQueryDeletedrevs::execute(), ApiQueryCategoryInfo::execute(), ApiQueryBlocks::execute(), ApiQueryAllUsers::execute(), ApiQueryInfo::getProtectionInfo(), ApiQueryInfo::getTSIDs(), ApiQueryBacklinks::prepareFirstQuery(), ApiQueryContributions::prepareQuery(), ApiQueryBacklinks::prepareSecondQuery(), ApiQueryWatchlistRaw::run(), ApiQueryWatchlist::run(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryExtLinksUsage::run(), ApiQueryDuplicateFiles::run(), ApiQueryCategoryMembers::run(), ApiQueryCategories::run(), ApiQueryAllpages::run(), ApiQueryAllLinks::run(), ApiQueryAllimages::run(), ApiQueryAllCategories::run(), and ApiQueryCategoryMembers::setContinuation().
ApiQueryBase::addWhereFld | ( | $ | field, | |
$ | value | |||
) | [protected] |
Equivalent to addWhere(array($field => $value)).
$field | string Field name | |
$value | string Value; ignored if null or empty array; |
Definition at line 169 of file ApiQueryBase.php.
Referenced by ApiQueryUsers::execute(), ApiQueryRevisions::execute(), ApiQueryRecentChanges::execute(), ApiQueryLogEvents::execute(), ApiQueryLangLinks::execute(), ApiQueryExternalLinks::execute(), ApiQueryDeletedrevs::execute(), ApiQueryBlocks::execute(), ApiQueryAllUsers::execute(), ApiQueryInfo::getProtectionInfo(), ApiQueryBacklinks::prepareFirstQuery(), ApiQueryContributions::prepareQuery(), ApiQueryRandom::prepareQuery(), ApiQueryBacklinks::prepareSecondQuery(), ApiQueryWatchlistRaw::run(), ApiQueryWatchlist::run(), ApiQueryProtectedTitles::run(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryExtLinksUsage::run(), ApiQueryCategoryMembers::run(), ApiQueryCategories::run(), ApiQueryAllpages::run(), and ApiQueryAllLinks::run().
ApiQueryBase::addWhereIf | ( | $ | value, | |
$ | condition | |||
) | [protected] |
Same as addWhere(), but add the WHERE clauses only if a condition is met.
$value | mixed See addWhere() | |
$condition | boolIf false, do nothing |
Definition at line 156 of file ApiQueryBase.php.
References addWhere().
Referenced by ApiQueryRecentChanges::execute(), ApiQueryContributions::prepareQuery(), ApiQueryWatchlistRaw::run(), ApiQueryWatchlist::run(), and ApiQueryAllpages::run().
ApiQueryBase::addWhereRange | ( | $ | field, | |
$ | dir, | |||
$ | start, | |||
$ | end, | |||
$ | sort = true | |||
) | [protected] |
Add a WHERE clause corresponding to a range, and an ORDER BY clause to sort in the right direction.
$field | string Field name | |
$dir | string If 'newer', sort in ascending order, otherwise sort in descending order | |
$start | string Value to start the list at. If $dir == 'newer' this is the lower boundary, otherwise it's the upper boundary | |
$end | string Value to end the list at. If $dir == 'newer' this is the upper boundary, otherwise it's the lower boundary | |
$sort | bool If false, don't add an ORDER BY clause |
Definition at line 188 of file ApiQueryBase.php.
References $db, $end, $sort, $start, addOption(), addWhere(), and getDB().
Referenced by ApiQueryRevisions::execute(), ApiQueryRecentChanges::execute(), ApiQueryLogEvents::execute(), ApiQueryDeletedrevs::execute(), ApiQueryBlocks::execute(), ApiQueryContributions::prepareQuery(), ApiQueryRandom::prepareQuery(), ApiQueryWatchlist::run(), ApiQueryProtectedTitles::run(), ApiQueryCategoryMembers::run(), ApiQueryAllpages::run(), ApiQueryAllimages::run(), and ApiQueryAllCategories::run().
ApiQueryBase::checkRowCount | ( | ) | [protected] |
Estimate the row count for the SELECT query that would be run if we called select() right now, and check if it's acceptable.
Definition at line 245 of file ApiQueryBase.php.
References $db, $wgAPIMaxDBRows, getDB(), ApiBase::profileDBIn(), and ApiBase::profileDBOut().
ApiQueryBase::getAliasedName | ( | $ | table, | |
$ | alias | |||
) | [protected] |
Get the SQL for a table name with alias.
$table | string Table name | |
$alias | string Alias |
Definition at line 84 of file ApiQueryBase.php.
References getDB().
Referenced by addTables(), ApiQueryUsers::execute(), and ApiQueryAllUsers::execute().
static ApiQueryBase::getBaseVersion | ( | ) | [static] |
Get version string for use in the API help output.
Reimplemented from ApiBase.
Definition at line 416 of file ApiQueryBase.php.
ApiQueryBase::getDB | ( | ) | [protected] |
Get the Query database connection (read-only).
Definition at line 337 of file ApiQueryBase.php.
References getQuery().
Referenced by addWhereRange(), ApiQuerySiteinfo::appendInterwikiMap(), checkRowCount(), ApiQueryContributions::execute(), ApiQueryRevisions::execute(), ApiQueryRecentChanges::execute(), ApiQueryLogEvents::execute(), ApiQueryLangLinks::execute(), ApiQueryInfo::execute(), ApiQueryExternalLinks::execute(), ApiQueryDeletedrevs::execute(), ApiQueryCategoryInfo::execute(), ApiQueryAllUsers::execute(), getAliasedName(), ApiQueryInfo::getProtectionInfo(), ApiPageSet::getRedirectTargets(), ApiQueryInfo::getTSIDs(), ApiPageSet::initFromPageIds(), ApiPageSet::initFromRevIDs(), ApiPageSet::initFromTitles(), ApiQueryBacklinks::prepareFirstQuery(), ApiQueryContributions::prepareQuery(), ApiQueryBacklinks::prepareSecondQuery(), ApiPageSet::resolvePendingRedirects(), ApiQueryWatchlistRaw::run(), ApiQueryWatchlist::run(), ApiQueryProtectedTitles::run(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryExtLinksUsage::run(), ApiQueryDuplicateFiles::run(), ApiQueryCategoryMembers::run(), ApiQueryCategories::run(), ApiQueryBacklinks::run(), ApiQueryAllpages::run(), ApiQueryAllLinks::run(), ApiQueryAllimages::run(), ApiQueryAllCategories::run(), ApiQueryRandom::runQuery(), select(), and ApiQueryCategoryMembers::setContinuation().
ApiQueryBase::getPageSet | ( | ) | [protected] |
Get the PageSet object to work on.
Definition at line 359 of file ApiQueryBase.php.
References getQuery().
Referenced by ApiQueryRevisions::execute(), ApiQueryLangLinks::execute(), ApiQueryInfo::execute(), ApiQueryImageInfo::execute(), ApiQueryExternalLinks::execute(), ApiQueryDeletedrevs::execute(), ApiQueryCategoryInfo::execute(), ApiQueryBlocks::execute(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryDuplicateFiles::run(), and ApiQueryCategories::run().
ApiQueryBase::getQuery | ( | ) |
Get the main Query module.
Definition at line 281 of file ApiQueryBase.php.
Referenced by getDB(), getPageSet(), and selectNamedDB().
ApiQueryBase::keyPartToTitle | ( | $ | keyPart | ) |
An alternative to keyToTitle() that doesn't trim trailing spaces.
$keyPart | string Key part with spaces |
Definition at line 408 of file ApiQueryBase.php.
References keyToTitle().
ApiQueryBase::keyToTitle | ( | $ | key | ) |
The inverse of titleToKey().
$key | string Page title with underscores |
Definition at line 383 of file ApiQueryBase.php.
References $key, $t, and ApiBase::dieUsageMsg().
Referenced by ApiQueryAllUsers::execute(), keyPartToTitle(), ApiQueryLinks::run(), ApiQueryDuplicateFiles::run(), ApiQueryAllpages::run(), ApiQueryAllLinks::run(), ApiQueryAllimages::run(), and ApiQueryAllCategories::run().
ApiQueryBase::requestExtraData | ( | $ | pageSet | ) |
Override this method to request extra fields from the pageSet using $pageSet->requestField('fieldName').
$pageSet | ApiPageSet |
Reimplemented in ApiQueryInfo.
Definition at line 274 of file ApiQueryBase.php.
ApiQueryBase::resetQueryParams | ( | ) | [protected] |
Blank the internal arrays with query parameters.
Definition at line 52 of file ApiQueryBase.php.
Referenced by __construct(), ApiQuerySiteinfo::appendInterwikiMap(), ApiQueryInfo::getProtectionInfo(), ApiQueryInfo::getTSIDs(), ApiQueryRandom::prepareQuery(), and ApiQueryBacklinks::run().
ApiQueryBase::select | ( | $ | method | ) | [protected] |
Execute a SELECT query based on the values in the internal arrays.
$method | string Function the query should be attributed to. You should usually use __METHOD__ here |
Definition at line 228 of file ApiQueryBase.php.
References $db, $method, $res, getDB(), ApiBase::profileDBIn(), and ApiBase::profileDBOut().
Referenced by ApiQuerySiteinfo::appendInterwikiMap(), ApiQueryUsers::execute(), ApiQueryContributions::execute(), ApiQueryRevisions::execute(), ApiQueryRecentChanges::execute(), ApiQueryLogEvents::execute(), ApiQueryLangLinks::execute(), ApiQueryExternalLinks::execute(), ApiQueryDeletedrevs::execute(), ApiQueryCategoryInfo::execute(), ApiQueryBlocks::execute(), ApiQueryAllUsers::execute(), ApiQueryInfo::getProtectionInfo(), ApiQueryInfo::getTSIDs(), ApiQueryWatchlistRaw::run(), ApiQueryWatchlist::run(), ApiQueryProtectedTitles::run(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryExtLinksUsage::run(), ApiQueryDuplicateFiles::run(), ApiQueryCategoryMembers::run(), ApiQueryCategories::run(), ApiQueryBacklinks::run(), ApiQueryAllpages::run(), ApiQueryAllLinks::run(), ApiQueryAllimages::run(), ApiQueryAllCategories::run(), and ApiQueryRandom::runQuery().
ApiQueryBase::selectNamedDB | ( | $ | name, | |
$ | db, | |||
$ | groups | |||
) |
Selects the query database connection with the given name.
See ApiQuery::getNamedDB() for more information
$name | string Name to assign to the database connection | |
$db | int One of the DB_* constants | |
$groups | array Query groups |
Definition at line 351 of file ApiQueryBase.php.
References $db, $name, and getQuery().
Referenced by ApiQueryContributions::execute(), ApiQueryWatchlistRaw::run(), and ApiQueryWatchlist::run().
ApiQueryBase::setContinueEnumParameter | ( | $ | paramName, | |
$ | paramValue | |||
) | [protected] |
Set a query-continue value.
$paramName | string Parameter name | |
$paramValue | string Parameter value |
Definition at line 325 of file ApiQueryBase.php.
References $msg, ApiBase::encodeParamName(), ApiBase::getModuleName(), and ApiBase::getResult().
Referenced by ApiQueryUsers::execute(), ApiQueryContributions::execute(), ApiQuerySiteinfo::execute(), ApiQueryRevisions::execute(), ApiQueryRecentChanges::execute(), ApiQueryLogEvents::execute(), ApiQueryLangLinks::execute(), ApiQueryInfo::execute(), ApiQueryImageInfo::execute(), ApiQueryExternalLinks::execute(), ApiQueryDeletedrevs::execute(), ApiQueryCategoryInfo::execute(), ApiQueryBlocks::execute(), ApiQueryAllUsers::execute(), ApiQueryAllmessages::execute(), ApiQueryWatchlistRaw::run(), ApiQueryWatchlist::run(), ApiQuerySearch::run(), ApiQueryProtectedTitles::run(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryExtLinksUsage::run(), ApiQueryDuplicateFiles::run(), ApiQueryCategoryMembers::run(), ApiQueryCategories::run(), ApiQueryAllpages::run(), ApiQueryAllLinks::run(), ApiQueryAllimages::run(), and ApiQueryAllCategories::run().
ApiQueryBase::titlePartToKey | ( | $ | titlePart | ) |
An alternative to titleToKey() that doesn't trim trailing spaces.
$titlePart | string Title part with spaces |
Definition at line 399 of file ApiQueryBase.php.
References titleToKey().
Referenced by ApiQueryAllpages::run(), ApiQueryAllimages::run(), and ApiQueryAllCategories::run().
ApiQueryBase::titleToKey | ( | $ | title | ) |
Convert a title to a DB key.
$title | string Page title with spaces |
Definition at line 368 of file ApiQueryBase.php.
References $t, $title, ApiBase::dieUsageMsg(), and Title::newFromText().
Referenced by ApiQueryDeletedrevs::execute(), ApiQueryWatchlistRaw::run(), ApiQueryLinks::run(), ApiQueryImages::run(), ApiQueryDuplicateFiles::run(), ApiQueryCategories::run(), ApiQueryAllLinks::run(), and titlePartToKey().
ApiQueryBase::$fields [private] |
ApiQueryBase::$join_conds [private] |
ApiQueryBase::$mDb [private] |
Definition at line 40 of file ApiQueryBase.php.
ApiQueryBase::$mQueryModule [private] |
Definition at line 40 of file ApiQueryBase.php.
ApiQueryBase::$options [private] |
Definition at line 40 of file ApiQueryBase.php.
ApiQueryBase::$tables [private] |
Definition at line 40 of file ApiQueryBase.php.
Referenced by addTables(), ApiPageSet::initFromRevIDs(), and ApiQueryContributions::prepareQuery().
ApiQueryBase::$where [private] |
Definition at line 40 of file ApiQueryBase.php.
Referenced by ApiQueryDeletedrevs::execute(), and ApiPageSet::initFromRevIDs().