MediaWiki 1.42.0-rc.0
ApiQueryWatchlist.php
Go to the documentation of this file.
1<?php
34
42
43 private CommentStore $commentStore;
44 private WatchedItemQueryService $watchedItemQueryService;
45 private Language $contentLanguage;
46 private NamespaceInfo $namespaceInfo;
47 private GenderCache $genderCache;
48 private CommentFormatter $commentFormatter;
49 private TempUserConfig $tempUserConfig;
50
62 public function __construct(
63 ApiQuery $query,
64 $moduleName,
65 CommentStore $commentStore,
66 WatchedItemQueryService $watchedItemQueryService,
67 Language $contentLanguage,
68 NamespaceInfo $namespaceInfo,
69 GenderCache $genderCache,
70 CommentFormatter $commentFormatter,
71 TempUserConfig $tempUserConfig
72 ) {
73 parent::__construct( $query, $moduleName, 'wl' );
74 $this->commentStore = $commentStore;
75 $this->watchedItemQueryService = $watchedItemQueryService;
76 $this->contentLanguage = $contentLanguage;
77 $this->namespaceInfo = $namespaceInfo;
78 $this->genderCache = $genderCache;
79 $this->commentFormatter = $commentFormatter;
80 $this->tempUserConfig = $tempUserConfig;
81 }
82
83 public function execute() {
84 $this->run();
85 }
86
87 public function executeGenerator( $resultPageSet ) {
88 $this->run( $resultPageSet );
89 }
90
91 private $fld_ids = false, $fld_title = false, $fld_patrol = false,
92 $fld_flags = false, $fld_timestamp = false, $fld_user = false,
93 $fld_comment = false, $fld_parsedcomment = false, $fld_sizes = false,
94 $fld_notificationtimestamp = false, $fld_userid = false,
95 $fld_loginfo = false, $fld_tags;
96
98 private $fld_expiry = false;
99
104 private function run( $resultPageSet = null ) {
105 $params = $this->extractRequestParams();
106
107 $user = $this->getUser();
108 $wlowner = $this->getWatchlistUser( $params );
109
110 if ( $params['prop'] !== null && $resultPageSet === null ) {
111 $prop = array_fill_keys( $params['prop'], true );
112
113 $this->fld_ids = isset( $prop['ids'] );
114 $this->fld_title = isset( $prop['title'] );
115 $this->fld_flags = isset( $prop['flags'] );
116 $this->fld_user = isset( $prop['user'] );
117 $this->fld_userid = isset( $prop['userid'] );
118 $this->fld_comment = isset( $prop['comment'] );
119 $this->fld_parsedcomment = isset( $prop['parsedcomment'] );
120 $this->fld_timestamp = isset( $prop['timestamp'] );
121 $this->fld_sizes = isset( $prop['sizes'] );
122 $this->fld_patrol = isset( $prop['patrol'] );
123 $this->fld_notificationtimestamp = isset( $prop['notificationtimestamp'] );
124 $this->fld_loginfo = isset( $prop['loginfo'] );
125 $this->fld_tags = isset( $prop['tags'] );
126 $this->fld_expiry = isset( $prop['expiry'] );
127
128 if ( $this->fld_patrol && !$user->useRCPatrol() && !$user->useNPPatrol() ) {
129 $this->dieWithError( 'apierror-permissiondenied-patrolflag', 'patrol' );
130 }
131 }
132
133 $options = [
134 'dir' => $params['dir'] === 'older'
137 ];
138
139 if ( $resultPageSet === null ) {
140 $options['includeFields'] = $this->getFieldsToInclude();
141 } else {
142 $options['usedInGenerator'] = true;
143 }
144
145 if ( $params['start'] ) {
146 $options['start'] = $params['start'];
147 }
148 if ( $params['end'] ) {
149 $options['end'] = $params['end'];
150 }
151
152 $startFrom = null;
153 if ( $params['continue'] !== null ) {
154 $cont = $this->parseContinueParamOrDie( $params['continue'], [ 'string', 'int' ] );
155 $startFrom = $cont;
156 }
157
158 if ( $wlowner !== $user ) {
159 $options['watchlistOwner'] = $wlowner;
160 $options['watchlistOwnerToken'] = $params['token'];
161 }
162
163 if ( $params['namespace'] !== null ) {
164 $options['namespaceIds'] = $params['namespace'];
165 }
166
167 if ( $params['allrev'] ) {
168 $options['allRevisions'] = true;
169 }
170
171 if ( $params['show'] !== null ) {
172 $show = array_fill_keys( $params['show'], true );
173
174 /* Check for conflicting parameters. */
175 if ( $this->showParamsConflicting( $show ) ) {
176 $this->dieWithError( 'apierror-show' );
177 }
178
179 // Check permissions.
180 if ( isset( $show[WatchedItemQueryService::FILTER_PATROLLED] )
181 || isset( $show[WatchedItemQueryService::FILTER_NOT_PATROLLED] )
182 ) {
183 if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) {
184 $this->dieWithError( 'apierror-permissiondenied-patrolflag', 'permissiondenied' );
185 }
186 }
187
188 $options['filters'] = array_keys( $show );
189 }
190
191 if ( $params['type'] !== null ) {
192 $rcTypes = RecentChange::parseToRCType( $params['type'] );
193 if ( $rcTypes ) {
194 $options['rcTypes'] = $rcTypes;
195 }
196 }
197
198 $this->requireMaxOneParameter( $params, 'user', 'excludeuser' );
199 if ( $params['user'] !== null ) {
200 $options['onlyByUser'] = $params['user'];
201 }
202 if ( $params['excludeuser'] !== null ) {
203 $options['notByUser'] = $params['excludeuser'];
204 }
205
206 $options['limit'] = $params['limit'];
207
208 $this->getHookRunner()->onApiQueryWatchlistPrepareWatchedItemQueryServiceOptions(
209 $this, $params, $options );
210
211 $ids = [];
212 $items = $this->watchedItemQueryService->getWatchedItemsWithRecentChangeInfo( $wlowner, $options, $startFrom );
213
214 // Get gender information
215 if ( $items !== [] && $resultPageSet === null && $this->fld_title &&
216 $this->contentLanguage->needsGenderDistinction()
217 ) {
218 $usernames = [];
219 foreach ( $items as [ $watchedItem, ] ) {
221 $linkTarget = $watchedItem->getTarget();
222 if ( $this->namespaceInfo->hasGenderDistinction( $linkTarget->getNamespace() ) ) {
223 $usernames[] = $linkTarget->getText();
224 }
225 }
226 if ( $usernames !== [] ) {
227 $this->genderCache->doQuery( $usernames, __METHOD__ );
228 }
229 }
230
231 foreach ( $items as [ $watchedItem, $recentChangeInfo ] ) {
233 if ( $resultPageSet === null ) {
234 $vals = $this->extractOutputData( $watchedItem, $recentChangeInfo );
235 $fit = $this->getResult()->addValue( [ 'query', $this->getModuleName() ], null, $vals );
236 if ( !$fit ) {
237 $startFrom = [ $recentChangeInfo['rc_timestamp'], $recentChangeInfo['rc_id'] ];
238 break;
239 }
240 } elseif ( $params['allrev'] ) {
241 $ids[] = (int)$recentChangeInfo['rc_this_oldid'];
242 } else {
243 $ids[] = (int)$recentChangeInfo['rc_cur_id'];
244 }
245 }
246
247 if ( $startFrom !== null ) {
248 $this->setContinueEnumParameter( 'continue', implode( '|', $startFrom ) );
249 }
250
251 if ( $resultPageSet === null ) {
252 $this->getResult()->addIndexedTagName(
253 [ 'query', $this->getModuleName() ],
254 'item'
255 );
256 } elseif ( $params['allrev'] ) {
257 $resultPageSet->populateFromRevisionIDs( $ids );
258 } else {
259 $resultPageSet->populateFromPageIDs( $ids );
260 }
261 }
262
263 private function getFieldsToInclude() {
264 $includeFields = [];
265 if ( $this->fld_flags ) {
267 }
268 if ( $this->fld_user || $this->fld_userid || $this->fld_loginfo ) {
270 }
271 if ( $this->fld_user || $this->fld_loginfo ) {
272 $includeFields[] = WatchedItemQueryService::INCLUDE_USER;
273 }
274 if ( $this->fld_comment || $this->fld_parsedcomment ) {
276 }
277 if ( $this->fld_patrol ) {
280 }
281 if ( $this->fld_sizes ) {
283 }
284 if ( $this->fld_loginfo ) {
286 }
287 if ( $this->fld_tags ) {
288 $includeFields[] = WatchedItemQueryService::INCLUDE_TAGS;
289 }
290 return $includeFields;
291 }
292
293 private function showParamsConflicting( array $show ) {
294 return ( isset( $show[WatchedItemQueryService::FILTER_MINOR] )
295 && isset( $show[WatchedItemQueryService::FILTER_NOT_MINOR] ) )
296 || ( isset( $show[WatchedItemQueryService::FILTER_BOT] )
297 && isset( $show[WatchedItemQueryService::FILTER_NOT_BOT] ) )
298 || ( isset( $show[WatchedItemQueryService::FILTER_ANON] )
299 && isset( $show[WatchedItemQueryService::FILTER_NOT_ANON] ) )
300 || ( isset( $show[WatchedItemQueryService::FILTER_PATROLLED] )
301 && isset( $show[WatchedItemQueryService::FILTER_NOT_PATROLLED] ) )
302 || ( isset( $show[WatchedItemQueryService::FILTER_AUTOPATROLLED] )
303 && isset( $show[WatchedItemQueryService::FILTER_NOT_AUTOPATROLLED] ) )
304 || ( isset( $show[WatchedItemQueryService::FILTER_AUTOPATROLLED] )
305 && isset( $show[WatchedItemQueryService::FILTER_NOT_PATROLLED] ) )
306 || ( isset( $show[WatchedItemQueryService::FILTER_UNREAD] )
307 && isset( $show[WatchedItemQueryService::FILTER_NOT_UNREAD] ) );
308 }
309
310 private function extractOutputData( WatchedItem $watchedItem, array $recentChangeInfo ) {
311 /* Determine the title of the page that has been changed. */
312 $target = $watchedItem->getTarget();
313 if ( $target instanceof LinkTarget ) {
314 $title = Title::newFromLinkTarget( $target );
315 } else {
316 $title = Title::newFromPageIdentity( $target );
317 }
318 $user = $this->getUser();
319
320 /* Our output data. */
321 $vals = [];
322 $type = (int)$recentChangeInfo['rc_type'];
323 $vals['type'] = RecentChange::parseFromRCType( $type );
324 $anyHidden = false;
325
326 /* Create a new entry in the result for the title. */
327 if ( $this->fld_title || $this->fld_ids ) {
328 // These should already have been filtered out of the query, but just in case.
329 if ( $type === RC_LOG && ( $recentChangeInfo['rc_deleted'] & LogPage::DELETED_ACTION ) ) {
330 $vals['actionhidden'] = true;
331 $anyHidden = true;
332 }
333 if ( $type !== RC_LOG ||
334 LogEventsList::userCanBitfield(
335 $recentChangeInfo['rc_deleted'],
336 LogPage::DELETED_ACTION,
337 $user
338 )
339 ) {
340 if ( $this->fld_title ) {
341 ApiQueryBase::addTitleInfo( $vals, $title );
342 }
343 if ( $this->fld_ids ) {
344 $vals['pageid'] = (int)$recentChangeInfo['rc_cur_id'];
345 $vals['revid'] = (int)$recentChangeInfo['rc_this_oldid'];
346 $vals['old_revid'] = (int)$recentChangeInfo['rc_last_oldid'];
347 }
348 }
349 }
350
351 if ( $this->fld_user || $this->fld_userid ) {
352 if ( $recentChangeInfo['rc_deleted'] & RevisionRecord::DELETED_USER ) {
353 $vals['userhidden'] = true;
354 $anyHidden = true;
355 }
356 if ( RevisionRecord::userCanBitfield(
357 $recentChangeInfo['rc_deleted'],
358 RevisionRecord::DELETED_USER,
359 $user
360 ) ) {
361 if ( $this->fld_userid ) {
362 $vals['userid'] = (int)$recentChangeInfo['rc_user'];
363 // for backwards compatibility
364 $vals['user'] = (int)$recentChangeInfo['rc_user'];
365 }
366
367 if ( $this->fld_user ) {
368 $vals['user'] = $recentChangeInfo['rc_user_text'];
369 $vals['temp'] = $this->tempUserConfig->isTempName(
370 $recentChangeInfo['rc_user_text']
371 );
372 }
373
374 // Whether the user is a logged-out user (IP user). This does
375 // not include temporary users, though they are grouped with IP
376 // users for FILTER_NOT_ANON and FILTER_ANON, to match the
377 // recent changes filters (T343322).
378 $vals['anon'] = !$recentChangeInfo['rc_user'];
379
380 }
381 }
382
383 /* Add flags, such as new, minor, bot. */
384 if ( $this->fld_flags ) {
385 $vals['bot'] = (bool)$recentChangeInfo['rc_bot'];
386 $vals['new'] = $recentChangeInfo['rc_type'] == RC_NEW;
387 $vals['minor'] = (bool)$recentChangeInfo['rc_minor'];
388 }
389
390 /* Add sizes of each revision. (Only available on 1.10+) */
391 if ( $this->fld_sizes ) {
392 $vals['oldlen'] = (int)$recentChangeInfo['rc_old_len'];
393 $vals['newlen'] = (int)$recentChangeInfo['rc_new_len'];
394 }
395
396 /* Add the timestamp. */
397 if ( $this->fld_timestamp ) {
398 $vals['timestamp'] = wfTimestamp( TS_ISO_8601, $recentChangeInfo['rc_timestamp'] );
399 }
400
401 if ( $this->fld_notificationtimestamp ) {
402 $vals['notificationtimestamp'] = ( $watchedItem->getNotificationTimestamp() == null )
403 ? ''
404 : wfTimestamp( TS_ISO_8601, $watchedItem->getNotificationTimestamp() );
405 }
406
407 /* Add edit summary / log summary. */
408 if ( $this->fld_comment || $this->fld_parsedcomment ) {
409 if ( $recentChangeInfo['rc_deleted'] & RevisionRecord::DELETED_COMMENT ) {
410 $vals['commenthidden'] = true;
411 $anyHidden = true;
412 }
413 if ( RevisionRecord::userCanBitfield(
414 $recentChangeInfo['rc_deleted'],
415 RevisionRecord::DELETED_COMMENT,
416 $user
417 ) ) {
418 $comment = $this->commentStore->getComment( 'rc_comment', $recentChangeInfo )->text;
419 if ( $this->fld_comment ) {
420 $vals['comment'] = $comment;
421 }
422
423 if ( $this->fld_parsedcomment ) {
424 $vals['parsedcomment'] = $this->commentFormatter->format( $comment, $title );
425 }
426 }
427 }
428
429 /* Add the patrolled flag */
430 if ( $this->fld_patrol ) {
431 $vals['patrolled'] = $recentChangeInfo['rc_patrolled'] != RecentChange::PRC_UNPATROLLED;
432 $vals['unpatrolled'] = ChangesList::isUnpatrolled( (object)$recentChangeInfo, $user );
433 $vals['autopatrolled'] = $recentChangeInfo['rc_patrolled'] == RecentChange::PRC_AUTOPATROLLED;
434 }
435
436 if ( $this->fld_loginfo && $recentChangeInfo['rc_type'] == RC_LOG ) {
437 if ( $recentChangeInfo['rc_deleted'] & LogPage::DELETED_ACTION ) {
438 $vals['actionhidden'] = true;
439 $anyHidden = true;
440 }
441 if ( LogEventsList::userCanBitfield(
442 $recentChangeInfo['rc_deleted'],
443 LogPage::DELETED_ACTION,
444 $user
445 ) ) {
446 $vals['logid'] = (int)$recentChangeInfo['rc_logid'];
447 $vals['logtype'] = $recentChangeInfo['rc_log_type'];
448 $vals['logaction'] = $recentChangeInfo['rc_log_action'];
449
450 $logFormatter = LogFormatter::newFromRow( $recentChangeInfo );
451 $vals['logparams'] = $logFormatter->formatParametersForApi();
452 $vals['logdisplay'] = $logFormatter->getActionText();
453 }
454 }
455
456 if ( $this->fld_tags ) {
457 if ( $recentChangeInfo['rc_tags'] ) {
458 $tags = explode( ',', $recentChangeInfo['rc_tags'] );
459 ApiResult::setIndexedTagName( $tags, 'tag' );
460 $vals['tags'] = $tags;
461 } else {
462 $vals['tags'] = [];
463 }
464 }
465
466 if ( $this->fld_expiry ) {
467 // Add expiration, T263796
468 $expiry = $watchedItem->getExpiry( TS_ISO_8601 );
469 $vals['expiry'] = ( $expiry ?? false );
470 }
471
472 if ( $anyHidden && ( $recentChangeInfo['rc_deleted'] & RevisionRecord::DELETED_RESTRICTED ) ) {
473 $vals['suppressed'] = true;
474 }
475
476 $this->getHookRunner()->onApiQueryWatchlistExtractOutputData(
477 $this, $watchedItem, $recentChangeInfo, $vals );
478
479 return $vals;
480 }
481
482 public function getAllowedParams() {
483 return [
484 'allrev' => false,
485 'start' => [
486 ParamValidator::PARAM_TYPE => 'timestamp'
487 ],
488 'end' => [
489 ParamValidator::PARAM_TYPE => 'timestamp'
490 ],
491 'namespace' => [
492 ParamValidator::PARAM_ISMULTI => true,
493 ParamValidator::PARAM_TYPE => 'namespace'
494 ],
495 'user' => [
496 ParamValidator::PARAM_TYPE => 'user',
497 UserDef::PARAM_ALLOWED_USER_TYPES => [ 'name', 'ip', 'temp', 'id', 'interwiki' ],
498 ],
499 'excludeuser' => [
500 ParamValidator::PARAM_TYPE => 'user',
501 UserDef::PARAM_ALLOWED_USER_TYPES => [ 'name', 'ip', 'temp', 'id', 'interwiki' ],
502 ],
503 'dir' => [
504 ParamValidator::PARAM_DEFAULT => 'older',
505 ParamValidator::PARAM_TYPE => [
506 'newer',
507 'older'
508 ],
509 ApiBase::PARAM_HELP_MSG => 'api-help-param-direction',
511 'newer' => 'api-help-paramvalue-direction-newer',
512 'older' => 'api-help-paramvalue-direction-older',
513 ],
514 ],
515 'limit' => [
516 ParamValidator::PARAM_DEFAULT => 10,
517 ParamValidator::PARAM_TYPE => 'limit',
518 IntegerDef::PARAM_MIN => 1,
519 IntegerDef::PARAM_MAX => ApiBase::LIMIT_BIG1,
520 IntegerDef::PARAM_MAX2 => ApiBase::LIMIT_BIG2
521 ],
522 'prop' => [
523 ParamValidator::PARAM_ISMULTI => true,
524 ParamValidator::PARAM_DEFAULT => 'ids|title|flags',
526 ParamValidator::PARAM_TYPE => [
527 'ids',
528 'title',
529 'flags',
530 'user',
531 'userid',
532 'comment',
533 'parsedcomment',
534 'timestamp',
535 'patrol',
536 'sizes',
537 'notificationtimestamp',
538 'loginfo',
539 'tags',
540 'expiry',
541 ]
542 ],
543 'show' => [
544 ParamValidator::PARAM_ISMULTI => true,
545 ParamValidator::PARAM_TYPE => [
546 WatchedItemQueryService::FILTER_MINOR,
547 WatchedItemQueryService::FILTER_NOT_MINOR,
548 WatchedItemQueryService::FILTER_BOT,
549 WatchedItemQueryService::FILTER_NOT_BOT,
550 WatchedItemQueryService::FILTER_ANON,
551 WatchedItemQueryService::FILTER_NOT_ANON,
552 WatchedItemQueryService::FILTER_PATROLLED,
553 WatchedItemQueryService::FILTER_NOT_PATROLLED,
554 WatchedItemQueryService::FILTER_AUTOPATROLLED,
555 WatchedItemQueryService::FILTER_NOT_AUTOPATROLLED,
556 WatchedItemQueryService::FILTER_UNREAD,
557 WatchedItemQueryService::FILTER_NOT_UNREAD,
558 ]
559 ],
560 'type' => [
561 ParamValidator::PARAM_DEFAULT => 'edit|new|log|categorize',
562 ParamValidator::PARAM_ISMULTI => true,
564 ParamValidator::PARAM_TYPE => RecentChange::getChangeTypes()
565 ],
566 'owner' => [
567 ParamValidator::PARAM_TYPE => 'user',
568 UserDef::PARAM_ALLOWED_USER_TYPES => [ 'name' ],
569 ],
570 'token' => [
571 ParamValidator::PARAM_TYPE => 'string',
572 ParamValidator::PARAM_SENSITIVE => true,
573 ],
574 'continue' => [
575 ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
576 ],
577 ];
578 }
579
580 protected function getExamplesMessages() {
581 return [
582 'action=query&list=watchlist'
583 => 'apihelp-query+watchlist-example-simple',
584 'action=query&list=watchlist&wlprop=ids|title|timestamp|user|comment'
585 => 'apihelp-query+watchlist-example-props',
586 'action=query&list=watchlist&wlprop=ids|title|timestamp|user|comment|expiry'
587 => 'apihelp-query+watchlist-example-expiry',
588 'action=query&list=watchlist&wlallrev=&wlprop=ids|title|timestamp|user|comment'
589 => 'apihelp-query+watchlist-example-allrev',
590 'action=query&generator=watchlist&prop=info'
591 => 'apihelp-query+watchlist-example-generator',
592 'action=query&generator=watchlist&gwlallrev=&prop=revisions&rvprop=timestamp|user'
593 => 'apihelp-query+watchlist-example-generator-rev',
594 'action=query&list=watchlist&wlowner=Example&wltoken=123ABC'
595 => 'apihelp-query+watchlist-example-wlowner',
596 ];
597 }
598
599 public function getHelpUrls() {
600 return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Watchlist';
601 }
602}
getUser()
const RC_NEW
Definition Defines.php:117
const RC_LOG
Definition Defines.php:118
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
array $params
The job parameters.
run()
Run the job.
dieWithError( $msg, $code=null, $data=null, $httpCode=0)
Abort execution with an error.
Definition ApiBase.php:1533
parseContinueParamOrDie(string $continue, array $types)
Parse the 'continue' parameter in the usual format and validate the types of each part,...
Definition ApiBase.php:1725
const PARAM_HELP_MSG_PER_VALUE
((string|array|Message)[]) When PARAM_TYPE is an array, or 'string' with PARAM_ISMULTI,...
Definition ApiBase.php:211
const LIMIT_BIG1
Fast query, standard limit.
Definition ApiBase.php:236
requireMaxOneParameter( $params,... $required)
Dies if more than one parameter from a certain set of parameters are set and not false.
Definition ApiBase.php:985
getResult()
Get the result object.
Definition ApiBase.php:671
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
Definition ApiBase.php:171
const LIMIT_BIG2
Fast query, apihighlimits limit.
Definition ApiBase.php:238
getModuleName()
Get the name of the module being executed by this instance.
Definition ApiBase.php:532
getHookRunner()
Get an ApiHookRunner for running core API hooks.
Definition ApiBase.php:756
static addTitleInfo(&$arr, $title, $prefix='')
Add information (title and namespace) about a Title object to a result array.
setContinueEnumParameter( $paramName, $paramValue)
Overridden to set the generator param if in generator mode.
This query action allows clients to retrieve a list of recently modified pages that are part of the l...
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
__construct(ApiQuery $query, $moduleName, CommentStore $commentStore, WatchedItemQueryService $watchedItemQueryService, Language $contentLanguage, NamespaceInfo $namespaceInfo, GenderCache $genderCache, CommentFormatter $commentFormatter, TempUserConfig $tempUserConfig)
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
getExamplesMessages()
Returns usage examples for this module.
getHelpUrls()
Return links to more detailed help pages about the module.
executeGenerator( $resultPageSet)
Execute this module as a generator.
This is the main query class.
Definition ApiQuery.php:43
static setIndexedTagName(array &$arr, $tag)
Set the tag name for numeric-keyed values in XML format.
static isUnpatrolled( $rc, User $user)
Base class for language-specific code.
Definition Language.php:63
static newFromRow( $row)
Handy shortcut for constructing a formatter directly from database row.
Look up "gender" user preference.
This is the main service interface for converting single-line comments from various DB comment fields...
Handle database storage of comments such as edit summaries and log reasons.
Type definition for user types.
Definition UserDef.php:27
Page revision base class.
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
Represents a title within MediaWiki.
Definition Title.php:78
const PRC_UNPATROLLED
static parseToRCType( $type)
Parsing text to RC_* constants.
static parseFromRCType( $rcType)
Parsing RC_* constants to human-readable test.
const PRC_AUTOPATROLLED
Representation of a pair of user and title for watchlist entries.
getExpiry(?int $style=TS_MW)
When the watched item will expire.
getNotificationTimestamp()
Get the notification timestamp of this entry.
Service for formatting and validating API parameters.
Type definition for integer types.
Represents the target of a wiki link.
Interface for temporary user creation config and name matching.