56 private const IS_DELETED = 1;
57 private const CANNOT_VIEW = 2;
75 private $numUncachedDiffs = 0;
78 private $revisionStore;
81 private $contentHandlerFactory;
84 private $parserFactory;
87 private $slotRoleRegistry;
90 private $contentRenderer;
93 private $contentTransformer;
96 private $commentFormatter;
99 private $tempUserCreator;
102 private $userFactory;
134 parent::__construct( $queryModule, $moduleName, $paramPrefix );
137 $services = MediaWikiServices::getInstance();
138 $this->revisionStore = $revisionStore ?? $services->getRevisionStore();
139 $this->contentHandlerFactory = $contentHandlerFactory ?? $services->getContentHandlerFactory();
140 $this->parserFactory = $parserFactory ?? $services->getParserFactory();
141 $this->slotRoleRegistry = $slotRoleRegistry ?? $services->getSlotRoleRegistry();
142 $this->contentRenderer = $contentRenderer ?? $services->getContentRenderer();
143 $this->contentTransformer = $contentTransformer ?? $services->getContentTransformer();
144 $this->commentFormatter = $commentFormatter ?? $services->getCommentFormatter();
145 $this->tempUserCreator = $tempUserCreator ?? $services->getTempUserCreator();
146 $this->userFactory = $userFactory ?? $services->getUserFactory();
154 $this->
run( $resultPageSet );
169 $prop = array_fill_keys( $params[
'prop'],
true );
171 $this->fld_ids = isset( $prop[
'ids'] );
172 $this->fld_flags = isset( $prop[
'flags'] );
173 $this->fld_timestamp = isset( $prop[
'timestamp'] );
174 $this->fld_comment = isset( $prop[
'comment'] );
175 $this->fld_parsedcomment = isset( $prop[
'parsedcomment'] );
176 $this->fld_size = isset( $prop[
'size'] );
177 $this->fld_slotsize = isset( $prop[
'slotsize'] );
178 $this->fld_sha1 = isset( $prop[
'sha1'] );
179 $this->fld_slotsha1 = isset( $prop[
'slotsha1'] );
180 $this->fld_content = isset( $prop[
'content'] );
181 $this->fld_contentmodel = isset( $prop[
'contentmodel'] );
182 $this->fld_userid = isset( $prop[
'userid'] );
183 $this->fld_user = isset( $prop[
'user'] );
184 $this->fld_tags = isset( $prop[
'tags'] );
185 $this->fld_roles = isset( $prop[
'roles'] );
186 $this->fld_parsetree = isset( $prop[
'parsetree'] );
188 $this->slotRoles = $params[
'slots'];
190 if ( $this->slotRoles !==
null ) {
191 if ( $this->fld_parsetree ) {
193 'apierror-invalidparammix-cannotusewith',
196 ],
'invalidparammix' );
199 'expandtemplates',
'generatexml',
'parse',
'diffto',
'difftotext',
'difftotextpst',
202 if ( $params[$p] !==
null && $params[$p] !==
false ) {
204 'apierror-invalidparammix-cannotusewith',
207 ],
'invalidparammix' );
212 if ( !empty( $params[
'contentformat'] ) ) {
213 $this->contentFormat = $params[
'contentformat'];
216 $this->limit = $params[
'limit'];
218 if ( $params[
'difftotext'] !==
null ) {
219 $this->difftotext = $params[
'difftotext'];
220 $this->difftotextpst = $params[
'difftotextpst'];
221 } elseif ( $params[
'diffto'] !==
null ) {
222 if ( $params[
'diffto'] ==
'cur' ) {
223 $params[
'diffto'] = 0;
225 if ( ( !ctype_digit( $params[
'diffto'] ) || $params[
'diffto'] < 0 )
226 && $params[
'diffto'] !=
'prev' && $params[
'diffto'] !=
'next'
229 $this->
dieWithError( [
'apierror-baddiffto', $p ],
'diffto' );
234 if ( is_numeric( $params[
'diffto'] ) && $params[
'diffto'] != 0 ) {
235 $difftoRev = $this->revisionStore->getRevisionById( $params[
'diffto'] );
237 $this->
dieWithError( [
'apierror-nosuchrevid', $params[
'diffto'] ] );
240 $revDel = $this->checkRevDel( $difftoRev, RevisionRecord::DELETED_TEXT );
241 if ( $revDel & self::CANNOT_VIEW ) {
242 $this->
addWarning( [
'apiwarn-difftohidden', $difftoRev->getId() ] );
243 $params[
'diffto'] =
null;
246 $this->diffto = $params[
'diffto'];
249 $this->fetchContent = $this->fld_content || $this->diffto !==
null
253 if ( $this->fetchContent ) {
255 $this->expandTemplates = $params[
'expandtemplates'];
256 $this->generateXML = $params[
'generatexml'];
257 $this->parseContent = $params[
'parse'];
258 if ( $this->parseContent ) {
262 $this->section = $params[
'section'] ??
false;
267 if ( $this->limit ==
'max' ) {
268 $this->limit = $this->
getMain()->canApiHighLimits() ? $botMax : $userMax;
269 if ( $this->setParsedLimit ) {
274 $this->limit = $this->
getMain()->getParamValidator()->validateValue(
275 $this,
'limit', $this->limit ?? 10, [
276 ParamValidator::PARAM_TYPE =>
'limit',
277 IntegerDef::PARAM_MIN => 1,
278 IntegerDef::PARAM_MAX => $userMax,
279 IntegerDef::PARAM_MAX2 => $botMax,
280 IntegerDef::PARAM_IGNORE_RANGE =>
true,
284 $this->needSlots = $this->fetchContent || $this->fld_contentmodel ||
286 if ( $this->needSlots && $this->slotRoles ===
null ) {
290 $parentParam = $parent->encodeParamName( $parent->getModuleManager()->getModuleGroup( $name ) );
292 [
'apiwarn-deprecation-missingparam', $encParam ],
293 "action=query&{$parentParam}={$name}&!{$encParam}"
305 private function checkRevDel(
RevisionRecord $revision, $field ) {
306 $ret = $revision->
isDeleted( $field ) ? self::IS_DELETED : 0;
309 $ret |= ( $canSee ? 0 : self::CANNOT_VIEW );
326 if ( $this->fld_ids ) {
327 $vals[
'revid'] = (int)$revision->
getId();
333 if ( $this->fld_flags ) {
334 $vals[
'minor'] = $revision->
isMinor();
337 if ( $this->fld_user || $this->fld_userid ) {
338 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_USER );
339 if ( $revDel & self::IS_DELETED ) {
340 $vals[
'userhidden'] =
true;
343 if ( !( $revDel & self::CANNOT_VIEW ) ) {
344 $u = $revision->
getUser( RevisionRecord::RAW );
345 if ( $this->fld_user ) {
346 $vals[
'user'] = $u->getName();
348 if ( !$u->isRegistered() ) {
349 $vals[
'anon'] =
true;
352 if ( $this->fld_userid ) {
353 $vals[
'userid'] = $u->getId();
358 if ( $this->fld_timestamp ) {
362 if ( $this->fld_size ) {
364 $vals[
'size'] = (int)$revision->
getSize();
372 if ( $this->fld_sha1 ) {
373 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_TEXT );
374 if ( $revDel & self::IS_DELETED ) {
375 $vals[
'sha1hidden'] =
true;
378 if ( !( $revDel & self::CANNOT_VIEW ) ) {
380 $vals[
'sha1'] = Wikimedia\base_convert( $revision->
getSha1(), 36, 16, 40 );
390 if ( $this->fld_roles ) {
394 if ( $this->needSlots ) {
395 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_TEXT );
396 if ( ( $this->fld_slotsha1 || $this->fetchContent ) && ( $revDel & self::IS_DELETED ) ) {
399 $vals = array_merge( $vals, $this->extractAllSlotInfo( $revision, $revDel ) );
404 $vals[
'slotsmissing'] =
true;
406 LoggerFactory::getInstance(
'api-warning' )->error(
407 'Failed to access revision slots',
408 [
'revision' => $revision->
getId(),
'exception' => $ex, ]
412 if ( $this->fld_comment || $this->fld_parsedcomment ) {
413 $revDel = $this->checkRevDel( $revision, RevisionRecord::DELETED_COMMENT );
414 if ( $revDel & self::IS_DELETED ) {
415 $vals[
'commenthidden'] =
true;
418 if ( !( $revDel & self::CANNOT_VIEW ) ) {
419 $comment = $revision->
getComment( RevisionRecord::RAW );
420 $comment = $comment->text ??
'';
422 if ( $this->fld_comment ) {
423 $vals[
'comment'] = $comment;
426 if ( $this->fld_parsedcomment ) {
427 $vals[
'parsedcomment'] = $this->commentFormatter->format(
434 if ( $this->fld_tags ) {
435 if ( $row->ts_tags ) {
436 $tags = explode(
',', $row->ts_tags );
438 $vals[
'tags'] = $tags;
444 if ( $anyHidden && $revision->
isDeleted( RevisionRecord::DELETED_RESTRICTED ) ) {
445 $vals[
'suppressed'] =
true;
460 private function extractAllSlotInfo(
RevisionRecord $revision, $revDel ): array {
463 if ( $this->slotRoles ===
null ) {
465 $slot = $revision->
getSlot( SlotRecord::MAIN, RevisionRecord::RAW );
469 $vals[
'textmissing'] =
true;
475 $vals += $this->extractSlotInfo( $slot, $revDel,
$content );
476 if ( !empty( $vals[
'nosuchsection'] ) ) {
479 'apierror-nosuchsection-what',
481 $this->
msg(
'revid', $revision->
getId() )
487 $vals += $this->extractDeprecatedContent(
$content, $revision );
491 $roles = array_intersect( $this->slotRoles, $revision->
getSlotRoles() );
495 foreach ( $roles as $role ) {
497 $slot = $revision->
getSlot( $role, RevisionRecord::RAW );
501 $vals[
'slots'][$role][
'missing'] =
true;
505 $vals[
'slots'][$role] = $this->extractSlotInfo( $slot, $revDel,
$content );
510 $vals[
'slots'][$role][
'contentmodel'] =
$content->getModel();
511 $vals[
'slots'][$role][
'contentformat'] =
$content->getDefaultFormat();
513 $vals[
'slots'][$role],
538 if ( $this->fld_slotsize ) {
539 $vals[
'size'] = (int)$slot->
getSize();
542 if ( $this->fld_slotsha1 ) {
543 if ( $revDel & self::IS_DELETED ) {
544 $vals[
'sha1hidden'] =
true;
546 if ( !( $revDel & self::CANNOT_VIEW ) ) {
547 if ( $slot->
getSha1() !=
'' ) {
548 $vals[
'sha1'] = Wikimedia\base_convert( $slot->
getSha1(), 36, 16, 40 );
555 if ( $this->fld_contentmodel ) {
556 $vals[
'contentmodel'] = $slot->
getModel();
560 if ( $this->fetchContent ) {
561 if ( $revDel & self::IS_DELETED ) {
562 $vals[
'texthidden'] =
true;
564 if ( !( $revDel & self::CANNOT_VIEW ) ) {
569 $vals[
'textmissing'] =
true;
574 if (
$content && $this->section !==
false ) {
577 $vals[
'nosuchsection'] =
true;
596 if ( $this->fld_parsetree || ( $this->fld_content && $this->generateXML ) ) {
599 '@phan-var WikitextContent $content';
600 $t =
$content->getText(); # note: don
't set $text
602 $parser = $this->parserFactory->create();
603 $parser->startExternalParse(
605 ParserOptions::newFromContext( $this->getContext() ),
606 Parser::OT_PREPROCESS
608 $dom = $parser->preprocessToDom( $t );
609 // @phan-suppress-next-line PhanUndeclaredMethodInCallable
610 if ( is_callable( [ $dom, 'saveXML
' ] ) ) {
611 // @phan-suppress-next-line PhanUndeclaredMethod
612 $xml = $dom->saveXML();
614 // @phan-suppress-next-line PhanUndeclaredMethod
615 $xml = $dom->__toString();
617 $vals['parsetree
'] = $xml;
619 $vals['badcontentformatforparsetree
'] = true;
622 'apierror-parsetree-notwikitext-title
',
623 wfEscapeWikiText( $title->getPrefixedText() ),
626 'parsetree-notwikitext
'
631 if ( $this->fld_content ) {
634 if ( $this->expandTemplates && !$this->parseContent ) {
635 if ( $content->getModel() === CONTENT_MODEL_WIKITEXT ) {
638 $text = $content->getText();
640 $text = $this->parserFactory->create()->preprocess(
643 ParserOptions::newFromContext( $this->getContext() )
647 'apierror-templateexpansion-notwikitext
',
648 wfEscapeWikiText( $title->getPrefixedText() ),
651 $vals['badcontentformat
'] = true;
655 if ( $this->parseContent ) {
656 $po = $this->contentRenderer->getParserOutput(
660 ParserOptions::newFromContext( $this->getContext() )
662 $text = $po->getText();
665 if ( $text === null ) {
666 $format = $this->contentFormat ?: $content->getDefaultFormat();
667 $model = $content->getModel();
669 if ( !$content->isSupportedFormat( $format ) ) {
670 $name = wfEscapeWikiText( $title->getPrefixedText() );
671 $this->addWarning( [ 'apierror-badformat
', $this->contentFormat, $model, $name ] );
672 $vals['badcontentformat
'] = true;
675 $text = $content->serialize( $format );
676 // always include format and model.
677 // Format is needed to deserialize, model is needed to interpret.
678 $vals['contentformat
'] = $format;
679 $vals['contentmodel
'] = $model;
683 if ( $text !== false ) {
684 ApiResult::setContentValue( $vals, 'content
', $text );
688 if ( $content && ( $this->diffto !== null || $this->difftotext !== null ) ) {
689 if ( $this->numUncachedDiffs < $this->getConfig()->get( MainConfigNames::APIMaxUncachedDiffs ) ) {
691 $context = new DerivativeContext( $this->getContext() );
692 $context->setTitle( $title );
693 $handler = $content->getContentHandler();
695 if ( $this->difftotext !== null ) {
696 $model = $title->getContentModel();
698 if ( $this->contentFormat
699 && !$this->contentHandlerFactory->getContentHandler( $model )
700 ->isSupportedFormat( $this->contentFormat )
702 $name = wfEscapeWikiText( $title->getPrefixedText() );
703 $this->addWarning( [ 'apierror-badformat
', $this->contentFormat, $model, $name ] );
704 $vals['diff
']['badcontentformat
'] = true;
707 $difftocontent = $this->contentHandlerFactory->getContentHandler( $model )
708 ->unserializeContent( $this->difftotext, $this->contentFormat );
710 if ( $this->difftotextpst ) {
711 $popts = ParserOptions::newFromContext( $this->getContext() );
712 $difftocontent = $this->contentTransformer->preSaveTransform(
715 $this->getUserForPreview(),
720 $engine = $handler->createDifferenceEngine( $context );
721 $engine->setContent( $content, $difftocontent );
724 $engine = $handler->createDifferenceEngine( $context, $revision->getId(), $this->diffto );
725 $vals['diff
']['from
'] = $engine->getOldid();
726 $vals['diff
']['to
'] = $engine->getNewid();
729 $difftext = $engine->getDiffBody();
730 ApiResult::setContentValue( $vals['diff
'], 'body
', $difftext );
731 if ( !$engine->wasCacheHit() ) {
732 $this->numUncachedDiffs++;
734 foreach ( $engine->getRevisionLoadErrors() as $msg ) {
735 $this->addWarning( $msg );
739 $vals['diff
']['notcached
'] = true;
746 private function getUserForPreview() {
747 $user = $this->getUser();
748 if ( $this->tempUserCreator->shouldAutoCreate( $user, 'edit
' ) ) {
749 return $this->userFactory->newUnsavedTempUser(
750 $this->tempUserCreator->getStashedNameOrPlaceholder( $this->getRequest()->getSession() )
762 public function getCacheMode( $params ) {
763 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,
832 ParamValidator::PARAM_TYPE => 'limit
',
833 IntegerDef::PARAM_MIN => 1,
834 IntegerDef::PARAM_MAX => ApiBase::LIMIT_BIG1,
835 IntegerDef::PARAM_MAX2 => ApiBase::LIMIT_BIG2,
836 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-limit
',
838 'expandtemplates
' => [
839 ParamValidator::PARAM_DEFAULT => false,
840 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-expandtemplates
',
841 ParamValidator::PARAM_DEPRECATED => true,
844 ParamValidator::PARAM_DEFAULT => false,
845 ParamValidator::PARAM_DEPRECATED => true,
846 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-generatexml
',
849 ParamValidator::PARAM_DEFAULT => false,
850 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-parse
',
851 ParamValidator::PARAM_DEPRECATED => true,
854 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-section
',
857 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-diffto
',
858 ParamValidator::PARAM_DEPRECATED => true,
861 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-difftotext
',
862 ParamValidator::PARAM_DEPRECATED => true,
865 ParamValidator::PARAM_DEFAULT => false,
866 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-difftotextpst
',
867 ParamValidator::PARAM_DEPRECATED => true,
870 ParamValidator::PARAM_TYPE => $this->contentHandlerFactory->getAllContentFormats(),
871 ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-contentformat
',
872 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.Stability: stableto 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.
$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.