56 private const IS_DELETED = 1;
57 private const CANNOT_VIEW = 2;
75 private $numUncachedDiffs = 0;
117 parent::__construct( $queryModule, $moduleName, $paramPrefix );
120 $services = MediaWikiServices::getInstance();
121 $this->revisionStore = $revisionStore ?? $services->getRevisionStore();
122 $this->contentHandlerFactory = $contentHandlerFactory ?? $services->getContentHandlerFactory();
123 $this->parserFactory = $parserFactory ?? $services->getParserFactory();
124 $this->slotRoleRegistry = $slotRoleRegistry ?? $services->getSlotRoleRegistry();
125 $this->contentRenderer = $contentRenderer ?? $services->getContentRenderer();
126 $this->contentTransformer = $contentTransformer ?? $services->getContentTransformer();
127 $this->commentFormatter = $commentFormatter ?? $services->getCommentFormatter();
128 $this->tempUserCreator = $tempUserCreator ?? $services->getTempUserCreator();
129 $this->userFactory = $userFactory ?? $services->getUserFactory();
137 $this->
run( $resultPageSet );
152 $prop = array_fill_keys( $params[
'prop'],
true );
154 $this->fld_ids = isset( $prop[
'ids'] );
155 $this->fld_flags = isset( $prop[
'flags'] );
156 $this->fld_timestamp = isset( $prop[
'timestamp'] );
157 $this->fld_comment = isset( $prop[
'comment'] );
158 $this->fld_parsedcomment = isset( $prop[
'parsedcomment'] );
159 $this->fld_size = isset( $prop[
'size'] );
160 $this->fld_slotsize = isset( $prop[
'slotsize'] );
161 $this->fld_sha1 = isset( $prop[
'sha1'] );
162 $this->fld_slotsha1 = isset( $prop[
'slotsha1'] );
163 $this->fld_content = isset( $prop[
'content'] );
164 $this->fld_contentmodel = isset( $prop[
'contentmodel'] );
165 $this->fld_userid = isset( $prop[
'userid'] );
166 $this->fld_user = isset( $prop[
'user'] );
167 $this->fld_tags = isset( $prop[
'tags'] );
168 $this->fld_roles = isset( $prop[
'roles'] );
169 $this->fld_parsetree = isset( $prop[
'parsetree'] );
171 $this->slotRoles = $params[
'slots'];
173 if ( $this->slotRoles !==
null ) {
174 if ( $this->fld_parsetree ) {
176 'apierror-invalidparammix-cannotusewith',
179 ],
'invalidparammix' );
182 'expandtemplates',
'generatexml',
'parse',
'diffto',
'difftotext',
'difftotextpst',
185 if ( $params[$p] !==
null && $params[$p] !==
false ) {
187 'apierror-invalidparammix-cannotusewith',
190 ],
'invalidparammix' );
193 $this->slotContentFormats = [];
194 foreach ( $this->slotRoles as $slotRole ) {
195 if ( isset( $params[
'contentformat-' . $slotRole] ) ) {
196 $this->slotContentFormats[$slotRole] = $params[
'contentformat-' . $slotRole];
201 if ( !empty( $params[
'contentformat'] ) ) {
202 $this->contentFormat = $params[
'contentformat'];
205 $this->limit = $params[
'limit'];
207 if ( $params[
'difftotext'] !==
null ) {
208 $this->difftotext = $params[
'difftotext'];
209 $this->difftotextpst = $params[
'difftotextpst'];
210 } elseif ( $params[
'diffto'] !==
null ) {
211 if ( $params[
'diffto'] ==
'cur' ) {
212 $params[
'diffto'] = 0;
214 if ( ( !ctype_digit( $params[
'diffto'] ) || $params[
'diffto'] < 0 )
215 && $params[
'diffto'] !=
'prev' && $params[
'diffto'] !=
'next'
218 $this->
dieWithError( [
'apierror-baddiffto', $p ],
'diffto' );
223 if ( is_numeric( $params[
'diffto'] ) && $params[
'diffto'] != 0 ) {
224 $difftoRev = $this->revisionStore->getRevisionById( $params[
'diffto'] );
226 $this->
dieWithError( [
'apierror-nosuchrevid', $params[
'diffto'] ] );
229 $revDel = $this->checkRevDel( $difftoRev, RevisionRecord::DELETED_TEXT );
230 if ( $revDel & self::CANNOT_VIEW ) {
231 $this->
addWarning( [
'apiwarn-difftohidden', $difftoRev->getId() ] );
232 $params[
'diffto'] =
null;
235 $this->diffto = $params[
'diffto'];
238 $this->fetchContent = $this->fld_content || $this->diffto !==
null
242 if ( $this->fetchContent ) {
244 $this->expandTemplates = $params[
'expandtemplates'];
245 $this->generateXML = $params[
'generatexml'];
246 $this->parseContent = $params[
'parse'];
247 if ( $this->parseContent ) {
251 $this->section = $params[
'section'] ??
false;
256 if ( $this->limit ==
'max' ) {
257 $this->limit = $this->
getMain()->canApiHighLimits() ? $botMax : $userMax;
258 if ( $this->setParsedLimit ) {
263 $this->limit = $this->
getMain()->getParamValidator()->validateValue(
264 $this,
'limit', $this->limit ?? 10, [
265 ParamValidator::PARAM_TYPE =>
'limit',
266 IntegerDef::PARAM_MIN => 1,
267 IntegerDef::PARAM_MAX => $userMax,
268 IntegerDef::PARAM_MAX2 => $botMax,
269 IntegerDef::PARAM_IGNORE_RANGE =>
true,
273 $this->needSlots = $this->fetchContent || $this->fld_contentmodel ||
275 if ( $this->needSlots && $this->slotRoles ===
null ) {
279 $parentParam = $parent->encodeParamName( $parent->getModuleManager()->getModuleGroup( $name ) );
281 [
'apiwarn-deprecation-missingparam', $encParam ],
282 "action=query&{$parentParam}={$name}&!{$encParam}"
294 private function checkRevDel(
RevisionRecord $revision, $field ) {
295 $ret = $revision->
isDeleted( $field ) ? self::IS_DELETED : 0;
298 $ret |= ( $canSee ? 0 : self::CANNOT_VIEW );
315 if ( $this->fld_ids ) {
316 $vals[
'revid'] = (int)$revision->
getId();
322 if ( $this->fld_flags ) {
323 $vals[
'minor'] = $revision->
isMinor();
326 if ( $this->fld_user || $this->fld_userid ) {
327 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_USER );
328 if ( $revDel & self::IS_DELETED ) {
329 $vals[
'userhidden'] =
true;
332 if ( !( $revDel & self::CANNOT_VIEW ) ) {
333 $u = $revision->
getUser( RevisionRecord::RAW );
334 if ( $this->fld_user ) {
335 $vals[
'user'] = $u->getName();
337 if ( !$u->isRegistered() ) {
338 $vals[
'anon'] =
true;
341 if ( $this->fld_userid ) {
342 $vals[
'userid'] = $u->getId();
347 if ( $this->fld_timestamp ) {
351 if ( $this->fld_size ) {
353 $vals[
'size'] = (int)$revision->
getSize();
361 if ( $this->fld_sha1 ) {
362 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_TEXT );
363 if ( $revDel & self::IS_DELETED ) {
364 $vals[
'sha1hidden'] =
true;
367 if ( !( $revDel & self::CANNOT_VIEW ) ) {
369 $vals[
'sha1'] = Wikimedia\base_convert( $revision->
getSha1(), 36, 16, 40 );
379 if ( $this->fld_roles ) {
383 if ( $this->needSlots ) {
384 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_TEXT );
385 if ( ( $this->fld_slotsha1 || $this->fetchContent ) && ( $revDel & self::IS_DELETED ) ) {
388 $vals = array_merge( $vals, $this->extractAllSlotInfo( $revision, $revDel ) );
393 $vals[
'slotsmissing'] =
true;
395 LoggerFactory::getInstance(
'api-warning' )->error(
396 'Failed to access revision slots',
397 [
'revision' => $revision->
getId(),
'exception' => $ex, ]
401 if ( $this->fld_comment || $this->fld_parsedcomment ) {
402 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_COMMENT );
403 if ( $revDel & self::IS_DELETED ) {
404 $vals[
'commenthidden'] =
true;
407 if ( !( $revDel & self::CANNOT_VIEW ) ) {
408 $comment = $revision->
getComment( RevisionRecord::RAW );
409 $comment = $comment->text ??
'';
411 if ( $this->fld_comment ) {
412 $vals[
'comment'] = $comment;
415 if ( $this->fld_parsedcomment ) {
416 $vals[
'parsedcomment'] = $this->commentFormatter->format(
423 if ( $this->fld_tags ) {
424 if ( $row->ts_tags ) {
425 $tags = explode(
',', $row->ts_tags );
426 ApiResult::setIndexedTagName( $tags,
'tag' );
427 $vals[
'tags'] = $tags;
433 if ( $anyHidden && $revision->
isDeleted( RevisionRecord::DELETED_RESTRICTED ) ) {
434 $vals[
'suppressed'] =
true;
449 private function extractAllSlotInfo(
RevisionRecord $revision, $revDel ): array {
452 if ( $this->slotRoles ===
null ) {
454 $slot = $revision->
getSlot( SlotRecord::MAIN, RevisionRecord::RAW );
458 $vals[
'textmissing'] =
true;
464 $vals += $this->extractSlotInfo( $slot, $revDel,
$content );
465 if ( !empty( $vals[
'nosuchsection'] ) ) {
468 'apierror-nosuchsection-what',
470 $this->
msg(
'revid', $revision->
getId() )
476 $vals += $this->extractDeprecatedContent(
$content, $revision );
480 $roles = array_intersect( $this->slotRoles, $revision->
getSlotRoles() );
484 foreach ( $roles as $role ) {
486 $slot = $revision->
getSlot( $role, RevisionRecord::RAW );
490 $vals[
'slots'][$role][
'missing'] =
true;
494 $vals[
'slots'][$role] = $this->extractSlotInfo( $slot, $revDel,
$content );
500 $format = $this->slotContentFormats[$role] ??
$content->getDefaultFormat();
501 if ( !
$content->isSupportedFormat( $format ) ) {
503 'apierror-badformat',
506 $this->
msg(
'revid', $revision->
getId() )
508 $vals[
'slots'][$role][
'badcontentformat'] =
true;
510 $vals[
'slots'][$role][
'contentmodel'] = $model;
511 $vals[
'slots'][$role][
'contentformat'] = $format;
513 $vals[
'slots'][$role],
539 if ( $this->fld_slotsize ) {
540 $vals[
'size'] = (int)$slot->
getSize();
543 if ( $this->fld_slotsha1 ) {
544 if ( $revDel & self::IS_DELETED ) {
545 $vals[
'sha1hidden'] =
true;
547 if ( !( $revDel & self::CANNOT_VIEW ) ) {
548 if ( $slot->
getSha1() !=
'' ) {
549 $vals[
'sha1'] = Wikimedia\base_convert( $slot->
getSha1(), 36, 16, 40 );
556 if ( $this->fld_contentmodel ) {
557 $vals[
'contentmodel'] = $slot->
getModel();
561 if ( $this->fetchContent ) {
562 if ( $revDel & self::IS_DELETED ) {
563 $vals[
'texthidden'] =
true;
565 if ( !( $revDel & self::CANNOT_VIEW ) ) {
570 $vals[
'textmissing'] =
true;
575 if (
$content && $this->section !==
false ) {
578 $vals[
'nosuchsection'] =
true;
597 if ( $this->fld_parsetree || ( $this->fld_content && $this->generateXML ) ) {
600 '@phan-var WikitextContent $content';
601 $t =
$content->getText(); # note: don
't set $text
603 $parser = $this->parserFactory->create();
604 $parser->startExternalParse(
606 ParserOptions::newFromContext( $this->getContext() ),
607 Parser::OT_PREPROCESS
609 $dom = $parser->preprocessToDom( $t );
610 // @phan-suppress-next-line PhanUndeclaredMethodInCallable
611 if ( is_callable( [ $dom, 'saveXML
' ] ) ) {
612 // @phan-suppress-next-line PhanUndeclaredMethod
613 $xml = $dom->saveXML();
615 // @phan-suppress-next-line PhanUndeclaredMethod
616 $xml = $dom->__toString();
618 $vals['parsetree
'] = $xml;
620 $vals['badcontentformatforparsetree
'] = true;
623 'apierror-parsetree-notwikitext-title
',
624 wfEscapeWikiText( $title->getPrefixedText() ),
627 'parsetree-notwikitext
'
632 if ( $this->fld_content ) {
635 if ( $this->expandTemplates && !$this->parseContent ) {
636 if ( $content->getModel() === CONTENT_MODEL_WIKITEXT ) {
639 $text = $content->getText();
641 $text = $this->parserFactory->create()->preprocess(
644 ParserOptions::newFromContext( $this->getContext() )
648 'apierror-templateexpansion-notwikitext
',
649 wfEscapeWikiText( $title->getPrefixedText() ),
652 $vals['badcontentformat
'] = true;
656 if ( $this->parseContent ) {
657 $po = $this->contentRenderer->getParserOutput(
661 ParserOptions::newFromContext( $this->getContext() )
663 $text = $po->getText();
666 if ( $text === null ) {
667 $format = $this->contentFormat ?: $content->getDefaultFormat();
668 $model = $content->getModel();
670 if ( !$content->isSupportedFormat( $format ) ) {
671 $name = wfEscapeWikiText( $title->getPrefixedText() );
672 $this->addWarning( [ 'apierror-badformat
', $this->contentFormat, $model, $name ] );
673 $vals['badcontentformat
'] = true;
676 $text = $content->serialize( $format );
677 // always include format and model.
678 // Format is needed to deserialize, model is needed to interpret.
679 $vals['contentformat
'] = $format;
680 $vals['contentmodel
'] = $model;
684 if ( $text !== false ) {
685 ApiResult::setContentValue( $vals, 'content
', $text );
689 if ( $content && ( $this->diffto !== null || $this->difftotext !== null ) ) {
690 if ( $this->numUncachedDiffs < $this->getConfig()->get( MainConfigNames::APIMaxUncachedDiffs ) ) {
692 $context = new DerivativeContext( $this->getContext() );
693 $context->setTitle( $title );
694 $handler = $content->getContentHandler();
696 if ( $this->difftotext !== null ) {
697 $model = $title->getContentModel();
699 if ( $this->contentFormat
700 && !$this->contentHandlerFactory->getContentHandler( $model )
701 ->isSupportedFormat( $this->contentFormat )
703 $name = wfEscapeWikiText( $title->getPrefixedText() );
704 $this->addWarning( [ 'apierror-badformat
', $this->contentFormat, $model, $name ] );
705 $vals['diff
']['badcontentformat
'] = true;
708 $difftocontent = $this->contentHandlerFactory->getContentHandler( $model )
709 ->unserializeContent( $this->difftotext, $this->contentFormat );
711 if ( $this->difftotextpst ) {
712 $popts = ParserOptions::newFromContext( $this->getContext() );
713 $difftocontent = $this->contentTransformer->preSaveTransform(
716 $this->getUserForPreview(),
721 $engine = $handler->createDifferenceEngine( $context );
722 $engine->setContent( $content, $difftocontent );
725 $engine = $handler->createDifferenceEngine( $context, $revision->getId(), $this->diffto );
726 $vals['diff
']['from
'] = $engine->getOldid();
727 $vals['diff
']['to
'] = $engine->getNewid();
730 $difftext = $engine->getDiffBody();
731 ApiResult::setContentValue( $vals['diff
'], 'body
', $difftext );
732 if ( !$engine->wasCacheHit() ) {
733 $this->numUncachedDiffs++;
735 foreach ( $engine->getRevisionLoadErrors() as $msg ) {
736 $this->addWarning( $msg );
740 $vals['diff
']['notcached
'] = true;
747 private function getUserForPreview() {
748 $user = $this->getUser();
749 if ( $this->tempUserCreator->shouldAutoCreate( $user, 'edit
' ) ) {
750 return $this->userFactory->newUnsavedTempUser(
751 $this->tempUserCreator->getStashedName( $this->getRequest()->getSession() )
763 public function getCacheMode( $params ) {
764 if ( $this->userCanSeeRevDel() ) {
775 public function getAllowedParams() {
776 $slotRoles = $this->slotRoleRegistry->getKnownRoles();
777 sort( $slotRoles, SORT_STRING );
781 ParamValidator::PARAM_ISMULTI => true,
782 ParamValidator::PARAM_DEFAULT => 'ids|timestamp|flags|comment|user
',
783 ParamValidator::PARAM_TYPE => [
801 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-prop
',
802 ApiBase::PARAM_HELP_MSG_PER_VALUE => [
803 'ids
' => 'apihelp-query+revisions+base-paramvalue-prop-ids
',
804 'flags
' => 'apihelp-query+revisions+base-paramvalue-prop-flags
',
805 'timestamp
' => 'apihelp-query+revisions+base-paramvalue-prop-timestamp
',
806 'user
' => 'apihelp-query+revisions+base-paramvalue-prop-user
',
807 'userid
' => 'apihelp-query+revisions+base-paramvalue-prop-userid
',
808 'size
' => 'apihelp-query+revisions+base-paramvalue-prop-size
',
809 'slotsize
' => 'apihelp-query+revisions+base-paramvalue-prop-slotsize
',
810 'sha1
' => 'apihelp-query+revisions+base-paramvalue-prop-sha1
',
811 'slotsha1
' => 'apihelp-query+revisions+base-paramvalue-prop-slotsha1
',
812 'contentmodel
' => 'apihelp-query+revisions+base-paramvalue-prop-contentmodel
',
813 'comment
' => 'apihelp-query+revisions+base-paramvalue-prop-comment
',
814 'parsedcomment
' => 'apihelp-query+revisions+base-paramvalue-prop-parsedcomment
',
815 'content
' => 'apihelp-query+revisions+base-paramvalue-prop-content
',
816 'tags
' => 'apihelp-query+revisions+base-paramvalue-prop-tags
',
817 'roles
' => 'apihelp-query+revisions+base-paramvalue-prop-roles
',
818 'parsetree
' => [ 'apihelp-query+revisions+base-paramvalue-prop-parsetree
',
819 CONTENT_MODEL_WIKITEXT ],
821 EnumDef::PARAM_DEPRECATED_VALUES => [
826 ParamValidator::PARAM_TYPE => $slotRoles,
827 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-slots
',
828 ParamValidator::PARAM_ISMULTI => true,
829 ParamValidator::PARAM_ALL => true,
831 'contentformat-{slot}
' => [
832 ApiBase::PARAM_TEMPLATE_VARS => [ 'slot
' => 'slots
' ],
833 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-contentformat-slot
',
834 ParamValidator::PARAM_TYPE => $this->contentHandlerFactory->getAllContentFormats(),
837 ParamValidator::PARAM_TYPE => 'limit
',
838 IntegerDef::PARAM_MIN => 1,
839 IntegerDef::PARAM_MAX => ApiBase::LIMIT_BIG1,
840 IntegerDef::PARAM_MAX2 => ApiBase::LIMIT_BIG2,
841 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-limit
',
843 'expandtemplates
' => [
844 ParamValidator::PARAM_DEFAULT => false,
845 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-expandtemplates
',
846 ParamValidator::PARAM_DEPRECATED => true,
849 ParamValidator::PARAM_DEFAULT => false,
850 ParamValidator::PARAM_DEPRECATED => true,
851 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-generatexml
',
854 ParamValidator::PARAM_DEFAULT => false,
855 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-parse
',
856 ParamValidator::PARAM_DEPRECATED => true,
859 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-section
',
862 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-diffto
',
863 ParamValidator::PARAM_DEPRECATED => true,
866 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-difftotext
',
867 ParamValidator::PARAM_DEPRECATED => true,
870 ParamValidator::PARAM_DEFAULT => false,
871 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-difftotextpst
',
872 ParamValidator::PARAM_DEPRECATED => true,
875 ParamValidator::PARAM_TYPE => $this->contentHandlerFactory->getAllContentFormats(),
876 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-contentformat
',
877 ParamValidator::PARAM_DEPRECATED => true,
const CONTENT_MODEL_WIKITEXT
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
wfEscapeWikiText( $text)
Escapes the given text so that it may be output using addWikiText() without any linking,...
dieWithError( $msg, $code=null, $data=null, $httpCode=0)
Abort execution with an error.
getModulePrefix()
Get parameter prefix (usually two letters or an empty string).
getMain()
Get the main module.
addDeprecation( $msg, $feature, $data=[])
Add a deprecation warning for this module.
const LIMIT_BIG1
Fast query, standard limit.
const LIMIT_SML2
Slow query, apihighlimits limit.
getResult()
Get the result object.
const LIMIT_SML1
Slow query, standard limit.
addWarning( $msg, $code=null, $data=null)
Add a warning for this module.
const LIMIT_BIG2
Fast query, apihighlimits limit.
getModuleName()
Get the name of the module being executed by this instance.
This class contains a list of pages that the client has requested.
getParent()
Get the parent of this module.to override 1.25 ApiBase|null
encodeParamName( $paramName)
Overrides ApiBase to prepend 'g' to every generator parameter.
A base class for functions common to producing a list of revisions.
$fld_userid
The number of uncached diffs that had to be generated for this request.
$diffto
The number of uncached diffs that had to be generated for this request.
executeGenerator( $resultPageSet)
The number of uncached diffs that had to be generated for this request.
$slotContentFormats
The number of uncached diffs that had to be generated for this request.
$parseContent
The number of uncached diffs that had to be generated for this request.
$difftotext
The number of uncached diffs that had to be generated for this request.
$fld_sha1
The number of uncached diffs that had to be generated for this request.
$fld_ids
The number of uncached diffs that had to be generated for this request.
$fld_size
The number of uncached diffs that had to be generated for this request.
$fld_tags
The number of uncached diffs that had to be generated for this request.
$generateXML
The number of uncached diffs that had to be generated for this request.
$limit
The number of uncached diffs that had to be generated for this request.
$fld_comment
The number of uncached diffs that had to be generated for this request.
parseParameters( $params)
Parse the parameters into the various instance fields.
$needSlots
The number of uncached diffs that had to be generated for this request.
$expandTemplates
The number of uncached diffs that had to be generated for this request.
__construct(ApiQuery $queryModule, $moduleName, $paramPrefix='', RevisionStore $revisionStore=null, IContentHandlerFactory $contentHandlerFactory=null, ParserFactory $parserFactory=null, SlotRoleRegistry $slotRoleRegistry=null, ContentRenderer $contentRenderer=null, ContentTransformer $contentTransformer=null, CommentFormatter $commentFormatter=null, TempUserCreator $tempUserCreator=null, UserFactory $userFactory=null)
$fld_parsetree
The number of uncached diffs that had to be generated for this request.
$fld_slotsha1
The number of uncached diffs that had to be generated for this request.
$fetchContent
The number of uncached diffs that had to be generated for this request.
$fld_user
The number of uncached diffs that had to be generated for this request.
$fld_roles
The number of uncached diffs that had to be generated for this request.
execute()
The number of uncached diffs that had to be generated for this request.
$section
The number of uncached diffs that had to be generated for this request.
$fld_contentmodel
The number of uncached diffs that had to be generated for this request.
$setParsedLimit
The number of uncached diffs that had to be generated for this request.
$difftotextpst
The number of uncached diffs that had to be generated for this request.
$fld_parsedcomment
The number of uncached diffs that had to be generated for this request.
$fld_timestamp
The number of uncached diffs that had to be generated for this request.
$fld_content
The number of uncached diffs that had to be generated for this request.
$slotRoles
The number of uncached diffs that had to be generated for this request.
$fld_slotsize
The number of uncached diffs that had to be generated for this request.
run(ApiPageSet $resultPageSet=null)
$contentFormat
The number of uncached diffs that had to be generated for this request.
extractRevisionInfo(RevisionRecord $revision, $row)
Extract information from the RevisionRecord.
$fld_flags
The number of uncached diffs that had to be generated for this request.
This is the main query class.
static setArrayType(array &$arr, $type, $kvpKeyName=null)
Set the array data type.
static setIndexedTagName(array &$arr, $tag)
Set the tag name for numeric-keyed values in XML format.
const META_KVP_MERGE
Key for the metadata item that indicates that the KVP key should be added into an assoc value,...
static setContentValue(array &$arr, $name, $value, $flags=0)
Add an output value to the array by name and mark as META_CONTENT.
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
A service to render content.
A service to transform content.
A class containing constants representing the names of configuration variables.
Content object for wiki text pages.
Base interface for representing page content.
getModel()
Returns the ID of the content model used by this Content object.