Movatterモバイル変換


[0]ホーム

URL:


MediaWiki master
ApiQueryBase.php
Go to the documentation of this file.
1<?php
9namespaceMediaWiki\Api;
10
11useMediaWiki\MediaWikiServices;
12useMediaWiki\Title\MalformedTitleException;
13useMediaWiki\Title\Title;
14useMediaWiki\Title\TitleValue;
15use stdClass;
16useWikimedia\Rdbms\IDatabase;
17useWikimedia\Rdbms\IExpression;
18useWikimedia\Rdbms\IReadableDatabase;
19useWikimedia\Rdbms\IResultWrapper;
20useWikimedia\Rdbms\SelectQueryBuilder;
21
31abstractclassApiQueryBaseextendsApiBase {
32 useApiQueryBlockInfoTrait;
33
34privateApiQuery $mQueryModule;
35private ?IReadableDatabase $mDb;
37private array $virtualDBs;
38privatestring|false $currentDomain;
39
43private $queryBuilder;
44
51publicfunction__construct(ApiQuery $queryModule,string $moduleName, $paramPrefix ='' ) {
52 parent::__construct( $queryModule->getMain(), $moduleName, $paramPrefix );
53 $this->mQueryModule = $queryModule;
54 $this->mDb =null;
55 $this->virtualDBs = [];
56 $this->currentDomain =false;
57 $this->resetQueryParams();
58 }
59
60 /***************************************************************************/
61// region Methods to implement
76publicfunctiongetCacheMode( $params ) {
77return'private';
78 }
79
90publicfunctionrequestExtraData( $pageSet ) {
91 }
92
93// endregion -- end of methods to implement
94
95 /***************************************************************************/
96// region Data access
103publicfunctiongetQuery() {
104return $this->mQueryModule;
105 }
106
108publicfunctiongetParent() {
109return $this->getQuery();
110 }
111
119protectedfunctiongetDB() {
120if ( $this->currentDomain ) {
121if ( !isset( $this->virtualDBs[$this->currentDomain] ) ) {
123 ->getConnectionProvider()
124 ->getReplicaDatabase( $this->currentDomain );
125 $this->virtualDBs[$this->currentDomain] = $db;
126 }
127return $this->virtualDBs[$this->currentDomain];
128 }
129
130 $this->mDb ??= $this->getQuery()->getDB();
131
132return $this->mDb;
133 }
134
141protectedfunctionsetVirtualDomain(string|false $virtualDomain ) {
142 $this->currentDomain = $virtualDomain;
143 $this->updateQueryBuilderConnection();
144 }
145
151protectedfunctionresetVirtualDomain() {
152 $this->currentDomain =false;
153 $this->updateQueryBuilderConnection();
154 }
155
156privatefunction updateQueryBuilderConnection() {
157if ( $this->queryBuilder ) {
158 $this->queryBuilder->connection( $this->getDB() );
159 }
160 }
161
167protectedfunctiongetPageSet() {
168return $this->getQuery()->getPageSet();
169 }
170
171// endregion -- end of data access
172
173 /***************************************************************************/
174// region Querying
180protectedfunctionresetQueryParams() {
181 $this->queryBuilder =null;
182 }
183
192protectedfunctiongetQueryBuilder() {
193 $this->queryBuilder ??= $this->getDB()->newSelectQueryBuilder();
194return $this->queryBuilder;
195 }
196
204protectedfunctionaddTables( $tables, $alias =null ) {
205if ( is_array( $tables ) ) {
206if ( $alias !==null ) {
207ApiBase::dieDebug( __METHOD__,'Multiple table aliases not supported' );
208 }
209 $this->getQueryBuilder()->rawTables( $tables );
210 }else {
211 $this->getQueryBuilder()->table( $tables, $alias );
212 }
213 }
214
223protectedfunctionaddJoinConds( $join_conds ) {
224if ( !is_array( $join_conds ) ) {
225ApiBase::dieDebug( __METHOD__,'Join conditions have to be arrays' );
226 }
227 $this->getQueryBuilder()->joinConds( $join_conds );
228 }
229
234protectedfunctionaddFields( $value ) {
235 $this->getQueryBuilder()->fields( $value );
236 }
237
244protectedfunctionaddFieldsIf( $value, $condition ) {
245if ( $condition ) {
246 $this->addFields( $value );
247
248returntrue;
249 }
250
251returnfalse;
252 }
253
267protectedfunctionaddWhere( $value ) {
268if ( is_array( $value ) ) {
269// Double check: don't insert empty arrays,
270// Database::makeList() chokes on them
271if ( count( $value ) ) {
272 $this->getQueryBuilder()->where( $value );
273 }
274 }else {
275 $this->getQueryBuilder()->where( $value );
276 }
277 }
278
285protectedfunctionaddWhereIf( $value, $condition ) {
286if ( $condition ) {
287 $this->addWhere( $value );
288
289returntrue;
290 }
291
292returnfalse;
293 }
294
304protectedfunctionaddWhereFld( $field, $value ) {
305if ( $value !==null && !( is_array( $value ) && !$value ) ) {
306 $this->getQueryBuilder()->where( [ $field => $value ] );
307 }
308 }
309
331protectedfunctionaddWhereIDsFld( $table, $field, $ids ) {
332// Use count() to its full documented capabilities to simultaneously
333// test for null, empty array or empty countable object
334if ( count( $ids ) ) {
335 $ids = $this->filterIDs( [ [ $table, $field ] ], $ids );
336
337if ( $ids === [] ) {
338// Return nothing, no IDs are valid
339 $this->getQueryBuilder()->where('0 = 1' );
340 }else {
341 $this->getQueryBuilder()->where( [ $field => $ids ] );
342 }
343 }
344return count( $ids );
345 }
346
359protectedfunctionaddWhereRange( $field, $dir, $start, $end, $sort =true ) {
360 $isDirNewer = ( $dir ==='newer' );
361 $after = ( $isDirNewer ?'>=' :'<=' );
362 $before = ( $isDirNewer ?'<=' :'>=' );
363 $db = $this->getDB();
364
365if ( $start !==null ) {
366 $this->addWhere( $db->expr( $field, $after, $start ) );
367 }
368
369if ( $end !==null ) {
370 $this->addWhere( $db->expr( $field, $before, $end ) );
371 }
372
373if ( $sort ) {
374 $this->getQueryBuilder()->orderBy( $field, $isDirNewer ?null :'DESC' );
375 }
376 }
377
388protectedfunctionaddTimestampWhereRange( $field, $dir, $start, $end, $sort =true ) {
389 $db = $this->getDB();
390 $this->addWhereRange( $field, $dir,
391 $db->timestampOrNull( $start ), $db->timestampOrNull( $end ), $sort );
392 }
393
400protectedfunctionaddOption( $name, $value =null ) {
401 $this->getQueryBuilder()->option( $name, $value );
402 }
403
421protectedfunctionselect( $method, $extraQuery = [], ?array &$hookData =null ) {
422 $queryBuilder = clone $this->getQueryBuilder();
423if ( isset( $extraQuery['tables'] ) ) {
424 $queryBuilder->rawTables( (array)$extraQuery['tables'] );
425 }
426if ( isset( $extraQuery['fields'] ) ) {
427 $queryBuilder->fields( (array)$extraQuery['fields'] );
428 }
429if ( isset( $extraQuery['where'] ) ) {
430 $queryBuilder->where( (array)$extraQuery['where'] );
431 }
432if ( isset( $extraQuery['options'] ) ) {
433 $queryBuilder->options( (array)$extraQuery['options'] );
434 }
435if ( isset( $extraQuery['join_conds'] ) ) {
436 $queryBuilder->joinConds( (array)$extraQuery['join_conds'] );
437 }
438
439if ( $hookData !==null && $this->getHookContainer()->isRegistered('ApiQueryBaseBeforeQuery' ) ) {
440 $info = $queryBuilder->getQueryInfo();
441 $this->getHookRunner()->onApiQueryBaseBeforeQuery(
442 $this, $info['tables'], $info['fields'], $info['conds'],
443 $info['options'], $info['join_conds'], $hookData
444 );
445 $queryBuilder = $this->getDB()->newSelectQueryBuilder()->queryInfo( $info );
446 }
447
448 $queryBuilder->caller( $method );
449 $res = $queryBuilder->fetchResultSet();
450
451if ( $hookData !==null ) {
452 $this->getHookRunner()->onApiQueryBaseAfterQuery( $this, $res, $hookData );
453 }
454
455return $res;
456 }
457
471protectedfunctionprocessRow( $row, array &$data, array &$hookData ) {
472return $this->getHookRunner()->onApiQueryBaseProcessRow( $this, $row, $data, $hookData );
473 }
474
475// endregion -- end of querying
476
477 /***************************************************************************/
478// region Utility methods
488publicstaticfunctionaddTitleInfo( &$arr, $title, $prefix ='' ) {
489 $arr[$prefix .'ns'] = $title->getNamespace();
490 $arr[$prefix .'title'] = $title->getPrefixedText();
491 }
492
499protectedfunctionaddPageSubItems( $pageId, $data ) {
500 $result = $this->getResult();
502
503return $result->addValue( ['query','pages', (int)$pageId ],
504 $this->getModuleName(),
505 $data );
506 }
507
516protectedfunctionaddPageSubItem( $pageId, $item, $elemname =null ) {
517 $result = $this->getResult();
518 $fit = $result->addValue( ['query','pages', $pageId,
519 $this->getModuleName() ],null, $item );
520if ( !$fit ) {
521returnfalse;
522 }
523 $result->addIndexedTagName(
524 ['query','pages', $pageId, $this->getModuleName() ],
525 $elemname ?? $this->getModulePrefix()
526 );
527
528returntrue;
529 }
530
536protectedfunctionsetContinueEnumParameter( $paramName, $paramValue ) {
537 $this->getContinuationManager()->addContinueParam( $this, $paramName, $paramValue );
538 }
539
550publicfunctiontitlePartToKey( $titlePart, $namespace =NS_MAIN ) {
551 $t = Title::makeTitleSafe( $namespace, $titlePart .'x' );
552if ( !$t || $t->hasFragment() ) {
553// Invalid title (e.g. bad chars) or contained a '#'.
554 $this->dieWithError( ['apierror-invalidtitle',wfEscapeWikiText( $titlePart ) ] );
555 }
556if ( $namespace != $t->getNamespace() || $t->isExternal() ) {
557// This can happen in two cases. First, if you call titlePartToKey with a title part
558// that looks like a namespace, but with $defaultNamespace = NS_MAIN. It would be very
559// difficult to handle such a case. Such cases cannot exist and are therefore treated
560// as invalid user input. The second case is when somebody specifies a title interwiki
561// prefix.
562 $this->dieWithError( ['apierror-invalidtitle',wfEscapeWikiText( $titlePart ) ] );
563 }
564
565return substr( $t->getDBkey(), 0, -1 );
566 }
567
576protectedfunctionparsePrefixedTitlePart( $titlePart, $defaultNamespace =NS_MAIN ) {
577try {
578 $titleParser =MediaWikiServices::getInstance()->getTitleParser();
579 $t = $titleParser->parseTitle( $titlePart .'X', $defaultNamespace );
580 }catch (MalformedTitleException ) {
581 $t =null;
582 }
583
584if ( !$t || $t->hasFragment() || $t->isExternal() || $t->getDBkey() ==='X' ) {
585// Invalid title (e.g. bad chars) or contained a '#'.
586 $this->dieWithError( ['apierror-invalidtitle',wfEscapeWikiText( $titlePart ) ] );
587 }
588
589returnnewTitleValue( $t->getNamespace(), substr( $t->getDBkey(), 0, -1 ) );
590 }
591
596publicfunctionvalidateSha1Hash( $hash ) {
597return (bool)preg_match('/^[a-f0-9]{40}$/', $hash );
598 }
599
604publicfunctionvalidateSha1Base36Hash( $hash ) {
605return (bool)preg_match('/^[a-z0-9]{31}$/', $hash );
606 }
607
613publicfunctionuserCanSeeRevDel() {
614return $this->getAuthority()->isAllowedAny(
615'deletedhistory',
616'deletedtext',
617'deleterevision',
618'suppressrevision',
619'viewsuppressed'
620 );
621 }
622
633IResultWrapper $res, $fname = __METHOD__, $fieldPrefix ='page'
634 ) {
635if ( !$res->numRows() ) {
636return;
637 }
638
640if ( !$services->getContentLanguage()->needsGenderDistinction() ) {
641return;
642 }
643
644 $nsInfo = $services->getNamespaceInfo();
645 $namespaceField = $fieldPrefix .'_namespace';
646 $titleField = $fieldPrefix .'_title';
647
648 $usernames = [];
649foreach ( $res as $row ) {
650if ( $nsInfo->hasGenderDistinction( $row->$namespaceField ) ) {
651 $usernames[] = $row->$titleField;
652 }
653 }
654
655if ( $usernames === [] ) {
656return;
657 }
658
659 $genderCache = $services->getGenderCache();
660 $genderCache->doQuery( $usernames, $fname );
661 }
662
663// endregion -- end of utility methods
664}
665
667class_alias( ApiQueryBase::class,'ApiQueryBase' );
NS_MAIN
const NS_MAIN
DefinitionDefines.php:51
wfEscapeWikiText
wfEscapeWikiText( $input)
Escapes the given text so that it may be output using addWikiText() without any linking,...
DefinitionGlobalFunctions.php:1060
MediaWiki\Api\ApiBase
This abstract class implements many basic API functions, and is the base of all API classes.
DefinitionApiBase.php:61
MediaWiki\Api\ApiBase\dieWithError
dieWithError( $msg, $code=null, $data=null, $httpCode=0)
Abort execution with an error.
DefinitionApiBase.php:1511
MediaWiki\Api\ApiBase\getModulePrefix
getModulePrefix()
Get parameter prefix (usually two letters or an empty string).
DefinitionApiBase.php:552
MediaWiki\Api\ApiBase\getContinuationManager
getContinuationManager()
DefinitionApiBase.php:719
MediaWiki\Api\ApiBase\getModuleName
getModuleName()
Get the name of the module being executed by this instance.
DefinitionApiBase.php:543
MediaWiki\Api\ApiBase\getHookRunner
getHookRunner()
Get an ApiHookRunner for running core API hooks.
DefinitionApiBase.php:767
MediaWiki\Api\ApiBase\getMain
getMain()
Get the main module.
DefinitionApiBase.php:561
MediaWiki\Api\ApiBase\getResult
getResult()
Get the result object.
DefinitionApiBase.php:682
MediaWiki\Api\ApiBase\filterIDs
filterIDs( $fields, array $ids)
Filter out-of-range values from a list of positive integer IDs.
DefinitionApiBase.php:1386
MediaWiki\Api\ApiBase\dieDebug
static dieDebug( $method, $message)
Internal code errors should be reported with this method.
DefinitionApiBase.php:1748
MediaWiki\Api\ApiBase\getHookContainer
getHookContainer()
Get a HookContainer, for running extension hooks or for hook metadata.
DefinitionApiBase.php:752
MediaWiki\Api\ApiQueryBase
This is a base class for all Query modules.
DefinitionApiQueryBase.php:31
MediaWiki\Api\ApiQueryBase\addOption
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
DefinitionApiQueryBase.php:400
MediaWiki\Api\ApiQueryBase\getParent
getParent()
Get the parent of this module.to override 1.25 ApiBase|null
DefinitionApiQueryBase.php:108
MediaWiki\Api\ApiQueryBase\addFieldsIf
addFieldsIf( $value, $condition)
Same as addFields(), but add the fields only if a condition is met.
DefinitionApiQueryBase.php:244
MediaWiki\Api\ApiQueryBase\addTitleInfo
static addTitleInfo(&$arr, $title, $prefix='')
Add information (title and namespace) about a Title object to a result array.
DefinitionApiQueryBase.php:488
MediaWiki\Api\ApiQueryBase\addWhereIf
addWhereIf( $value, $condition)
Same as addWhere(), but add the WHERE clauses only if a condition is met.
DefinitionApiQueryBase.php:285
MediaWiki\Api\ApiQueryBase\addPageSubItems
addPageSubItems( $pageId, $data)
Add a sub-element under the page element with the given page ID.
DefinitionApiQueryBase.php:499
MediaWiki\Api\ApiQueryBase\validateSha1Base36Hash
validateSha1Base36Hash( $hash)
DefinitionApiQueryBase.php:604
MediaWiki\Api\ApiQueryBase\addTables
addTables( $tables, $alias=null)
Add a set of tables to the internal array.
DefinitionApiQueryBase.php:204
MediaWiki\Api\ApiQueryBase\addPageSubItem
addPageSubItem( $pageId, $item, $elemname=null)
Same as addPageSubItems(), but one element of $data at a time.
DefinitionApiQueryBase.php:516
MediaWiki\Api\ApiQueryBase\addJoinConds
addJoinConds( $join_conds)
Add a set of JOIN conditions to the internal array.
DefinitionApiQueryBase.php:223
MediaWiki\Api\ApiQueryBase\addWhereIDsFld
addWhereIDsFld( $table, $field, $ids)
Like addWhereFld for an integer list of IDs.
DefinitionApiQueryBase.php:331
MediaWiki\Api\ApiQueryBase\resetVirtualDomain
resetVirtualDomain()
Reset the virtual domain to the main database.
DefinitionApiQueryBase.php:151
MediaWiki\Api\ApiQueryBase\setVirtualDomain
setVirtualDomain(string|false $virtualDomain)
Set the Query database connection (read-only)
DefinitionApiQueryBase.php:141
MediaWiki\Api\ApiQueryBase\getDB
getDB()
Get the Query database connection (read-only).
DefinitionApiQueryBase.php:119
MediaWiki\Api\ApiQueryBase\requestExtraData
requestExtraData( $pageSet)
Override this method to request extra fields from the pageSet using $pageSet->requestField('fieldName...
DefinitionApiQueryBase.php:90
MediaWiki\Api\ApiQueryBase\select
select( $method, $extraQuery=[], ?array &$hookData=null)
Execute a SELECT query based on the values in the internal arrays.
DefinitionApiQueryBase.php:421
MediaWiki\Api\ApiQueryBase\titlePartToKey
titlePartToKey( $titlePart, $namespace=NS_MAIN)
Convert an input title or title prefix into a dbkey.
DefinitionApiQueryBase.php:550
MediaWiki\Api\ApiQueryBase\addWhere
addWhere( $value)
Add a set of WHERE clauses to the internal array.
DefinitionApiQueryBase.php:267
MediaWiki\Api\ApiQueryBase\executeGenderCacheFromResultWrapper
executeGenderCacheFromResultWrapper(IResultWrapper $res, $fname=__METHOD__, $fieldPrefix='page')
Preprocess the result set to fill the GenderCache with the necessary information before using self::a...
DefinitionApiQueryBase.php:632
MediaWiki\Api\ApiQueryBase\parsePrefixedTitlePart
parsePrefixedTitlePart( $titlePart, $defaultNamespace=NS_MAIN)
Convert an input title or title prefix into a TitleValue.
DefinitionApiQueryBase.php:576
MediaWiki\Api\ApiQueryBase\getPageSet
getPageSet()
Get the PageSet object to work on.
DefinitionApiQueryBase.php:167
MediaWiki\Api\ApiQueryBase\getCacheMode
getCacheMode( $params)
Get the cache mode for the data generated by this module.
DefinitionApiQueryBase.php:76
MediaWiki\Api\ApiQueryBase\getQuery
getQuery()
Get the main Query module.
DefinitionApiQueryBase.php:103
MediaWiki\Api\ApiQueryBase\addTimestampWhereRange
addTimestampWhereRange( $field, $dir, $start, $end, $sort=true)
Add a WHERE clause corresponding to a range, similar to addWhereRange, but converts $start and $end t...
DefinitionApiQueryBase.php:388
MediaWiki\Api\ApiQueryBase\getQueryBuilder
getQueryBuilder()
Get the SelectQueryBuilder.
DefinitionApiQueryBase.php:192
MediaWiki\Api\ApiQueryBase\userCanSeeRevDel
userCanSeeRevDel()
Check whether the current user has permission to view revision-deleted fields.
DefinitionApiQueryBase.php:613
MediaWiki\Api\ApiQueryBase\setContinueEnumParameter
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
DefinitionApiQueryBase.php:536
MediaWiki\Api\ApiQueryBase\processRow
processRow( $row, array &$data, array &$hookData)
Call the ApiQueryBaseProcessRow hook.
DefinitionApiQueryBase.php:471
MediaWiki\Api\ApiQueryBase\resetQueryParams
resetQueryParams()
Blank the internal arrays with query parameters.
DefinitionApiQueryBase.php:180
MediaWiki\Api\ApiQueryBase\__construct
__construct(ApiQuery $queryModule, string $moduleName, $paramPrefix='')
DefinitionApiQueryBase.php:51
MediaWiki\Api\ApiQueryBase\validateSha1Hash
validateSha1Hash( $hash)
DefinitionApiQueryBase.php:596
MediaWiki\Api\ApiQueryBase\addWhereFld
addWhereFld( $field, $value)
Equivalent to addWhere( [ $field => $value ] )
DefinitionApiQueryBase.php:304
MediaWiki\Api\ApiQueryBase\addFields
addFields( $value)
Add a set of fields to select to the internal array.
DefinitionApiQueryBase.php:234
MediaWiki\Api\ApiQueryBase\addWhereRange
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.
DefinitionApiQueryBase.php:359
MediaWiki\Api\ApiQuery
This is the main query class.
DefinitionApiQuery.php:36
MediaWiki\Api\ApiResult\setIndexedTagName
static setIndexedTagName(array &$arr, $tag)
Set the tag name for numeric-keyed values in XML format.
DefinitionApiResult.php:612
MediaWiki\MediaWikiServices
Service locator for MediaWiki core services.
DefinitionMediaWikiServices.php:256
MediaWiki\MediaWikiServices\getInstance
static getInstance()
Returns the global default instance of the top level service locator.
DefinitionMediaWikiServices.php:344
MediaWiki\Title\MalformedTitleException
MalformedTitleException is thrown when a TitleParser is unable to parse a title string.
DefinitionMalformedTitleException.php:18
MediaWiki\Title\TitleValue
Represents the target of a wiki link.
DefinitionTitleValue.php:33
MediaWiki\Title\Title
Represents a title within MediaWiki.
DefinitionTitle.php:69
Wikimedia\Rdbms\SelectQueryBuilder
Build SELECT queries with a fluent interface.
DefinitionSelectQueryBuilder.php:26
Wikimedia\Rdbms\SelectQueryBuilder\getQueryInfo
getQueryInfo( $joinsName='join_conds')
Get an associative array describing the query in terms of its raw parameters to IReadableDatabase::se...
DefinitionSelectQueryBuilder.php:906
Wikimedia\Rdbms\SelectQueryBuilder\rawTables
rawTables( $tables)
Given a table or table array as might be passed to IReadableDatabase::select(), append it to the exis...
DefinitionSelectQueryBuilder.php:153
Wikimedia\Rdbms\SelectQueryBuilder\fetchResultSet
fetchResultSet()
Run the constructed SELECT query and return all results.
DefinitionSelectQueryBuilder.php:760
Wikimedia\Rdbms\SelectQueryBuilder\queryInfo
queryInfo( $info)
Set the query parameters to the given values, appending to the values which were already set.
DefinitionSelectQueryBuilder.php:115
Wikimedia\Rdbms\SelectQueryBuilder\options
options(array $options)
Manually set multiple options in the $options array to be passed to IReadableDatabase::select().
DefinitionSelectQueryBuilder.php:714
Wikimedia\Rdbms\SelectQueryBuilder\caller
caller( $fname)
Set the method name to be included in an SQL comment.
DefinitionSelectQueryBuilder.php:739
Wikimedia\Rdbms\SelectQueryBuilder\joinConds
joinConds(array $joinConds)
Manually append to the $join_conds array which will be passed to IReadableDatabase::select().
DefinitionSelectQueryBuilder.php:392
Wikimedia\Rdbms\SelectQueryBuilder\fields
fields( $fields)
Add a field or an array of fields to the query.
DefinitionSelectQueryBuilder.php:238
Wikimedia\Rdbms\SelectQueryBuilder\where
where( $conds)
Add conditions to the query.
DefinitionSelectQueryBuilder.php:340
MediaWiki\Api\ApiQueryBlockInfoTrait
trait ApiQueryBlockInfoTrait
DefinitionApiQueryBlockInfoTrait.php:22
Wikimedia\Rdbms\IDatabase
Interface to a relational database.
DefinitionIDatabase.php:31
Wikimedia\Rdbms\IExpression
DefinitionIExpression.php:10
Wikimedia\Rdbms\IReadableDatabase
A database connection without write operations.
DefinitionIReadableDatabase.php:20
Wikimedia\Rdbms\IResultWrapper
Result wrapper for grabbing data queried from an IDatabase object.
DefinitionIResultWrapper.php:26
Wikimedia\Rdbms\IResultWrapper\numRows
numRows()
Get the number of rows in a result object.
MediaWiki\Api
DefinitionApiAcquireTempUserName.php:8
MediaWiki\Api\getAuthority
getAuthority()

[8]ページ先頭

©2009-2025 Movatter.jp