MediaWiki  master
ContextSource Class Reference

The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and provide accessors to it. More...

Inheritance diagram for ContextSource:
Collaboration diagram for ContextSource:

Public Member Functions

 canUseWikiPage ()
 Check whether a WikiPage object can be get with getWikiPage(). More...
 
 exportSession ()
 Export the resolved user IP, HTTP headers, user ID, and session ID. More...
 
 getConfig ()
 
 getContext ()
 Get the base IContextSource object. More...
 
 getLanguage ()
 
 getOutput ()
 
 getRequest ()
 
 getSkin ()
 
 getStats ()
 
 getTiming ()
 
 getTitle ()
 
 getUser ()
 Stable to override. More...
 
 getWikiPage ()
 Get the WikiPage object. More...
 
 msg ( $key,... $params)
 Get a Message object with context set Parameters are the same as wfMessage() More...
 
 setContext (IContextSource $context)
 

Private Attributes

IContextSource $context
 

Detailed Description

The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and provide accessors to it.

Stable to extend

Since
1.18

Definition at line 30 of file ContextSource.php.

Member Function Documentation

◆ canUseWikiPage()

ContextSource::canUseWikiPage ( )

Check whether a WikiPage object can be get with getWikiPage().

Callers should expect that an exception is thrown from getWikiPage() if this method returns false.

Since
1.19 Stable to override
Returns
bool

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 98 of file ContextSource.php.

References getContext().

Referenced by SkinTemplate\buildContentNavigationUrls(), and OutputPage\getJSVars().

◆ exportSession()

ContextSource::exportSession ( )

Export the resolved user IP, HTTP headers, user ID, and session ID.

The result will be reasonably sized to allow for serialization.

Since
1.21 Stable to override
Returns
array

Implements IContextSource.

Definition at line 196 of file ContextSource.php.

References getContext().

Referenced by ApiUpload\getChunkResult(), and ApiUpload\performUpload().

◆ getConfig()

ContextSource::getConfig ( )
Since
1.23 Stable to override
Returns
Config

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 67 of file ContextSource.php.

References getContext().

Referenced by ApiProtect\__construct(), ApiUndelete\__construct(), ApiMove\__construct(), ApiRollback\__construct(), ApiDelete\__construct(), ApiUpload\__construct(), ApiWatch\__construct(), ApiEditPage\__construct(), ApiQueryQueryPage\__construct(), ImageListPager\__construct(), ActiveUsersPager\__construct(), ApiQuery\__construct(), ImageGalleryBase\__construct(), ApiMain\__construct(), HTMLForm\__construct(), OutputPage\adaptCdnTTL(), OutputPage\addParserOutputMetadata(), ApiMain\addRequestedFields(), Skin\addToSidebarPlain(), UploadForm\addUploadJS(), ApiQuerySiteinfo\appendDbReplLagInfo(), ApiQuerySiteinfo\appendExtensions(), ApiQuerySiteinfo\appendFileExtensions(), ApiQuerySiteinfo\appendGeneralInfo(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendLanguageVariants(), ApiQuerySiteinfo\appendNamespaces(), ApiQuerySiteinfo\appendProtocols(), ApiQuerySiteinfo\appendRestrictions(), ApiQuerySiteinfo\appendRightsInfo(), ApiQuerySiteinfo\appendSubscribedHooks(), ApiQuerySiteinfo\appendUploadDialog(), ApiQuerySiteinfo\appendUserGroups(), SkinTemplate\buildContentNavigationUrls(), SkinFallback\buildHelpfulInformationMessage(), Skin\buildNavUrls(), SkinTemplate\buildPersonalUrls(), SkinMustache\buildSearchProps(), Skin\buildSidebar(), ApiMain\checkBotReadOnly(), ApiMain\checkConditionalRequestHeaders(), OutputPage\checkLastModified(), ApiMain\checkMaxLag(), ApiUpload\checkVerification(), DifferenceEngine\debug(), ApiBase\dieWithErrorOrDebug(), OutputPage\disallowUserJs(), ApiMain\errorMessagesFromException(), ApiEmailUser\execute(), ApiFormatPhp\execute(), ApiProtect\execute(), ApiUndelete\execute(), ApiQueryAuthManagerInfo\execute(), ApiQueryBlocks\execute(), ApiUpload\execute(), ApiFeedRecentChanges\execute(), ApiQueryFileRepoInfo\execute(), ApiQueryLogEvents\execute(), ApiQueryAllUsers\execute(), ApiEditPage\execute(), ApiRemoveAuthenticationData\execute(), ApiSetPageLanguage\execute(), ApiFeedContributions\execute(), ApiRollback\execute(), ApiFeedWatchlist\execute(), ApiLogin\execute(), ApiOpenSearch\execute(), ApiQueryUsers\execute(), ApiQueryRevisionsBase\extractDeprecatedContent(), SkinFallback\findInstalledSkins(), OldChangesList\formatChangeLine(), HistoryPager\formatRow(), UsersPager\formatRow(), HTMLForm\getAction(), OutputPage\getAdvertisedFeedTypes(), ApiImport\getAllowedImportSources(), ApiQueryLogEvents\getAllowedLogActions(), ApiResetPassword\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryAllRevisions\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryAllDeletedRevisions\getAllowedParams(), ApiQueryUserContribs\getAllowedParams(), HTMLForm\getButtons(), Skin\getCachedNotice(), ApiQuerySiteinfo\getCacheMode(), OutputPage\getCacheVaryCookies(), Skin\getCategoryLinks(), ApiUpload\getChunkResult(), Skin\getCopyright(), Skin\getCopyrightIcon(), ApiQueryUserInfo\getCurrentUserInfo(), UploadForm\getDescriptionSection(), HistoryPager\getEndBody(), ApiResetPassword\getExamplesMessages(), ApiSetPageLanguage\getExtendedDescription(), ApiLogin\getExtendedDescription(), UploadForm\getExtensionsMessage(), OutputPage\getFeaturePolicyReportOnly(), ImageListPager\getFieldNames(), LogPager\getFilterParams(), ApiCSPReport\getFlags(), SkinTemplate\getFooterIcons(), SkinTemplate\getFooterLinks(), OutputPage\getFrameOptions(), OutputPage\getHeadLinksArray(), HTMLForm\getHiddenFields(), CategoryViewer\getHTML(), HTMLButtonField\getInputHTML(), Skin\getLanguages(), EnhancedChangesList\getLineData(), Skin\getLogo(), DifferenceEngine\getMarkPatrolledLinkInfo(), ApiMain\getMaxLag(), ApiBase\getModuleSourceInfo(), OutputPage\getOriginTrials(), ApiPageSet\getPageTableFields(), Skin\getPoweredBy(), NewFilesPager\getQueryInfo(), ActiveUsersPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), OutputPage\getReportTo(), Skin\getSiteFooterLinks(), Skin\getSkinStylePath(), UploadForm\getSourceSection(), SkinFallback\getTemplateData(), ApiQueryInfo\getVisitingWatcherInfo(), ApiQueryInfo\getWatcherInfo(), SkinTemplate\getWatchLinkAttrs(), ApiMain\handleCORS(), ApiResetPassword\hasAnyRoutes(), OutputPage\headElement(), ApiFormatBase\initPrinter(), ApiLogin\isDeprecated(), ImageListPager\isFieldSortable(), LogPager\limitAction(), LogPager\limitTitle(), LogPager\limitType(), ApiMain\logRequest(), Skin\makeFooterIcon(), Skin\mapInterwikiToLanguage(), ApiQueryImageInfo\mergeThumbParams(), OutputPage\output(), Skin\preloadExistence(), SkinTemplate\prepareQuickTemplate(), ApiMain\printResult(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), ChangesList\recentChangesFlags(), ApiQueryInfo\requestExtraData(), ApiBase\requirePostedParameters(), ApiQueryAllRevisions\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryExtLinksUsage\run(), ApiQuerySearch\run(), ApiQueryCategoryMembers\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryQueryPage\run(), ApiQueryBacklinksprop\run(), OutputPage\sendCacheControl(), ApiMain\sendCacheHeaders(), HTMLForm\setDisplayFormat(), ApiMain\setRequestExpectations(), SkinTemplate\setupTemplate(), OutputPage\showLagWarning(), LogEventsList\showOptions(), LoginHelper\showReturnToPage(), OutputPage\styleLink(), and ApiMain\substituteResultWithError().

◆ getContext()

ContextSource::getContext ( )

Get the base IContextSource object.

Since
1.18 Stable to override
Returns
IContextSource

Definition at line 42 of file ContextSource.php.

References $context, RequestContext\getMain(), and wfDebug().

Referenced by RevisionItem\__construct(), ApiBase\__construct(), OutputPage\addSubtitle(), SkinTemplate\buildContentNavigationUrls(), UsersPager\buildGroupLink(), Skin\buildNavUrls(), canUseWikiPage(), DerivativeContext\canUseWikiPage(), CategoryViewer\clearCategoryState(), ApiChangeContentModel\execute(), ApiEmailUser\execute(), ApiExpandTemplates\execute(), ApiRevisionDelete\execute(), ApiHelp\execute(), ApiOptions\execute(), ApiUnblock\execute(), ApiBlock\execute(), ApiFeedContributions\execute(), ApiUserrights\execute(), ApiComparePages\execute(), ApiParse\execute(), ApiQueryUsers\execute(), ApiMain\executeAction(), ApiMain\executeActionWithErrorHandling(), exportSession(), ApiQueryRevisionsBase\extractDeprecatedContent(), ApiFeedContributions\feedItem(), ChangesList\formatCharacterDifference(), ProtectedPagesPager\formatValue(), DifferenceEngine\generateContentDiffBody(), DifferenceEngine\generateTextDiffBody(), ApiUpload\getChunkResult(), getConfig(), DerivativeContext\getConfig(), ApiComparePages\getDiffRevision(), FormatMetadata\getExtendedMetadataFromHook(), ApiLinkAccount\getFinalDescription(), ApiAMCreateAccount\getFinalDescription(), ApiClientLogin\getFinalDescription(), ApiBase\getFinalDescription(), ApiBase\getFinalParamDescription(), ApiBase\getFinalSummary(), SkinTemplate\getFooterLinks(), OutputPage\getHeadLinksArray(), OutputPage\getJSVars(), getLanguage(), DerivativeContext\getLanguage(), EditWatchlistNormalHTMLForm\getLegend(), getOutput(), DerivativeContext\getOutput(), UsersPager\getPageHeader(), DifferenceEngine\getParserOutput(), ApiOptions\getPreferences(), getRequest(), DerivativeContext\getRequest(), getSkin(), DerivativeContext\getSkin(), DifferenceEngine\getSlotDiffRenderers(), UploadForm\getSourceSection(), NewFilesPager\getStartBody(), CategoryPager\getStartForm(), DerivativeContext\getTiming(), getTiming(), getTitle(), DerivativeContext\getTitle(), HTMLForm\getTitle(), Skin\getUndeleteLink(), ApiUserrights\getUrUser(), getUser(), DerivativeContext\getUser(), getWikiPage(), DerivativeContext\getWikiPage(), OutputPage\headElement(), HistoryPager\historyLine(), ChangesList\insertLog(), ChangesList\insertLogEntry(), ChangesList\insertRollback(), LogEventsList\logLine(), ApiParse\makeParserOptions(), msg(), OutputPage\parserOptions(), ApiUpload\performUpload(), SpecialTags\processCreateTagForm(), SpecialTags\processTagForm(), SpecialUnblock\processUIUnblock(), ChangesList\recentChangesFlags(), ApiOptions\resetPreferences(), MediaWiki\Preferences\DefaultPreferencesFactory\saveFormData(), OutputPage\setHTMLTitle(), OutputPage\setPageTitle(), OutputPage\setTitle(), SpecialComparePages\showDiff(), DifferenceEngine\showDiffPage(), LogEventsList\showOptions(), MediaWiki\Preferences\DefaultPreferencesFactory\submitForm(), SkinTemplate\tabAction(), DifferenceEngine\textDiff(), and MediaWiki\Preferences\DefaultPreferencesFactory\validateSignature().

◆ getLanguage()

ContextSource::getLanguage ( )
Since
1.19 Stable to override
Returns
Language

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 140 of file ContextSource.php.

References getContext().

Referenced by AllMessagesTablePager\__construct(), ApiMain\__construct(), DifferenceEngine\addHeader(), OutputPage\addInlineStyle(), ApiMain\addRequestedFields(), Skin\buildSidebar(), OutputPage\enableOOUI(), ApiHelp\execute(), ApiQueryAllMessages\execute(), ApiParamInfo\execute(), ApiFeedWatchlist\execute(), ApiQueryLanguageinfo\execute(), FormatMetadata\fetchExtendedMetadata(), OldChangesList\formatChangeLine(), FormatMetadata\formatNum(), CategoryPager\formatRow(), NewFilesPager\formatRow(), UsersPager\formatRow(), ActiveUsersPager\formatRow(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), AllMessagesTablePager\formatValue(), ChangesList\getArticleLink(), UploadForm\getExtensionsMessage(), CategoryViewer\getHTML(), Skin\getHtmlElementAttributes(), Skin\getLanguages(), IndexPager\getLimitLinks(), TablePager\getLimitSelectList(), AlphabeticPager\getNavigationBar(), ReverseChronologicalPager\getNavigationBar(), FormatMetadata\getPriorityLanguages(), ImageGalleryBase\getRenderLang(), BlockListPager\getRestrictionListHTML(), DifferenceEngine\getRevisionHeader(), OutputPage\getRlClientContext(), DifferenceEngine\getSlotHeader(), UploadForm\getSourceSection(), ImageHistoryList\getThumbForLine(), ChangesList\getTimestamp(), Skin\getUndeleteLink(), OutputPage\headElement(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ChangesList\insertDateHeader(), ChangesList\insertLogEntry(), ChangesList\insertUserRelatedLinks(), Skin\lastModified(), LogEventsList\logLine(), FormatMetadata\makeFormattedData(), SkinTemplate\prepareQuickTemplate(), SkinTemplate\prepareUserLanguageAttributes(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesLine(), HistoryPager\revLink(), OutputPage\showLagWarning(), DifferenceEngine\showMissingRevision(), OutputPage\styleLink(), and Skin\subPageSubtitle().

◆ getOutput()

ContextSource::getOutput ( )
Since
1.18 Stable to override
Returns
OutputPage

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 121 of file ContextSource.php.

References getContext().

Referenced by OOUIHTMLForm\__construct(), UploadForm\__construct(), CategoryViewer\__construct(), DifferenceEngineSlotDiffRenderer\addModules(), UploadForm\addUploadJS(), EnhancedChangesList\beginRecentChangesList(), ChangesList\beginRecentChangesList(), Skin\bottomScripts(), SkinTemplate\buildContentNavigationUrls(), Skin\buildFeedUrls(), SkinTemplate\buildNavUrls(), Skin\buildNavUrls(), ApiMain\checkConditionalRequestHeaders(), ImportReporter\close(), HTMLForm\displayForm(), Skin\editUrlOptions(), SkinMustache\generateHTML(), TablePager\getBody(), Skin\getCachedNotice(), Skin\getCategories(), Skin\getCategoryLinks(), Skin\getCopyright(), Skin\getDefaultModules(), SkinTemplate\getFooterLinks(), VFormHTMLForm\getHTML(), CategoryViewer\getHTML(), HTMLForm\getHTML(), CategoryViewer\getImageSection(), Skin\getLanguages(), DifferenceEngine\getMarkPatrolledLinkInfo(), TablePager\getNavigationBar(), Skin\getNewtalks(), CategoryViewer\getPagesSection(), Skin\getRevisionId(), HistoryPager\getStartBody(), SkinMustache\getTemplateData(), ApiMain\handleCORS(), Skin\isRevisionCurrent(), Skin\lastModified(), ImportReporter\open(), SkinTemplate\outputPage(), ImageListPager\outputUserDoesNotExist(), SkinTemplate\prepareQuickTemplate(), SkinTemplate\prepareSubtitle(), Skin\printSource(), DifferenceEngine\renderNewRevision(), ImportReporter\reportNotice(), ImportReporter\reportPage(), ApiMain\sendCacheHeaders(), DifferenceEngine\showDiff(), DifferenceEngine\showDiffPage(), DifferenceEngine\showDiffStyle(), DifferenceEngine\showMissingRevision(), LoginHelper\showReturnToPage(), Skin\subPageSubtitle(), and TraditionalImageGallery\toHTML().

◆ getRequest()

ContextSource::getRequest ( )
Since
1.18 Stable to override
Returns
WebRequest

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 76 of file ContextSource.php.

References getContext().

Referenced by TablePager\__construct(), ApiContinuationManager\__construct(), ImageListPager\__construct(), UsersPager\__construct(), IndexPager\__construct(), ApiMain\__construct(), OutputPage\addAcceptLanguage(), SkinTemplate\buildContentNavigationUrls(), Skin\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), OutputPage\checkLastModified(), ApiMain\checkMaxLag(), CategoryViewer\clearCategoryState(), ApiFormatBase\closePrinter(), ApiMain\createErrorPrinter(), ApiCSPReport\error(), ApiCheckToken\execute(), ApiQueryTokens\execute(), ApiQueryDeletedrevs\execute(), ApiFeedRecentChanges\execute(), ApiCSPReport\execute(), ApiEditPage\execute(), ApiLogin\execute(), MediaWiki\Rest\Handler\ActionModuleBasedHandler\execute(), ApiMain\executeActionWithErrorHandling(), OOUIHTMLForm\getButtons(), ApiMain\getCheck(), ApiQueryUserInfo\getCurrentUserInfo(), IndexPager\getDefaultQuery(), LogPager\getFilterParams(), OutputPage\getHeadLinksArray(), TablePager\getHiddenFields(), ApiCSPReport\getReport(), OutputPage\getRlClientContext(), UploadForm\getSourceSection(), NewFilesPager\getStartBody(), ApiTokens\getTokenTypes(), Skin\getUndeleteLink(), ApiMain\getUpload(), ApiMain\getUserAgent(), ApiMain\getVal(), ApiMain\handleCORS(), ApiMain\handleException(), PageDataRequestHandler\handleRequest(), OutputPage\haveCacheVaryCookies(), ApiQuery\instantiateModules(), ApiQuery\isReadMode(), ApiMain\lacksSameOriginSecurity(), HTMLForm\loadData(), ApiBase\logFeatureUsage(), ApiMain\logRequest(), OutputPage\output(), HTMLForm\prepareForm(), SkinTemplate\prepareQuickTemplate(), ApiMain\reportUnusedParams(), ApiBase\requirePostedParameters(), OutputPage\returnToMain(), ApiQueryRecentChanges\run(), OutputPage\sendCacheControl(), ApiMain\sendCacheHeaders(), ApiMain\setRequestExpectations(), ApiMain\setupExternalResponse(), SkinTemplate\setupTemplateContext(), DifferenceEngine\showDiffPage(), OutputPage\showPermissionsErrorPage(), HTMLForm\tryAuthorizedSubmit(), OutputPage\userCanPreview(), ApiBase\useTransactionalTimeLimit(), ApiBase\validateToken(), and ApiCSPReport\verifyPostBodyOk().

◆ getSkin()

ContextSource::getSkin ( )
Since
1.18 Stable to override
Returns
Skin

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 149 of file ContextSource.php.

References getContext().

Referenced by OutputPage\enableOOUI(), SkinTemplate\getFooterLinks(), OutputPage\getJSVars(), OutputPage\getRlClientContext(), and OutputPage\output().

◆ getStats()

ContextSource::getStats ( )
Deprecated:
since 1.27 use a StatsdDataFactory from MediaWikiServices (preferably injected)
Since
1.25 Stable to override
Returns
IBufferingStatsdDataFactory

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 169 of file ContextSource.php.

◆ getTiming()

ContextSource::getTiming ( )
Since
1.27 Stable to override
Returns
Timing

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 158 of file ContextSource.php.

References getContext().

◆ getTitle()

ContextSource::getTitle ( )

◆ getUser()

ContextSource::getUser ( )

Stable to override.

Since
1.18 Stable to override
Returns
User

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 131 of file ContextSource.php.

References getContext().

Referenced by UploadForm\__construct(), ImageHistoryPseudoPager\__construct(), HistoryPager\__construct(), LogEventsList\__construct(), IndexPager\__construct(), ApiBase\addBlockInfoToStatus(), DifferenceEngine\addHeader(), ImageHistoryList\beginImageHistoryList(), SkinTemplate\buildContentNavigationUrls(), Skin\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiMain\canApiHighLimits(), ApiMain\checkAsserts(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), OutputPage\checkLastModified(), ApiQueryRevisionsBase\checkRevDel(), ApiBase\checkTitleUserPermissions(), ApiBase\checkUserRightsAny(), ApiQuery\doExport(), LogPager\enforceActionRestrictions(), LogPager\enforcePerformerRestrictions(), ApiBase\errorArrayToStatus(), ApiValidatePassword\execute(), ApiChangeContentModel\execute(), ApiManageTags\execute(), ApiEmailUser\execute(), ApiImageRotate\execute(), ApiImport\execute(), ApiCheckToken\execute(), ApiClearHasMsg\execute(), ApiLogout\execute(), ApiPurge\execute(), ApiRevisionDelete\execute(), ApiQueryMyStashedFiles\execute(), ApiTag\execute(), ApiQueryStashImageInfo\execute(), ApiSetNotificationTimestamp\execute(), ApiPatrol\execute(), ApiChangeAuthenticationData\execute(), ApiQueryTokens\execute(), ApiUndelete\execute(), ApiProtect\execute(), ApiQueryAuthManagerInfo\execute(), ApiFileRevert\execute(), ApiStashEdit\execute(), ApiUnblock\execute(), ApiQueryBlocks\execute(), ApiMove\execute(), ApiQueryFilearchive\execute(), ApiUpload\execute(), ApiQueryDeletedrevs\execute(), ApiBlock\execute(), ApiCSPReport\execute(), ApiQueryImageInfo\execute(), ApiQueryLogEvents\execute(), ApiWatch\execute(), ApiRemoveAuthenticationData\execute(), ApiSetPageLanguage\execute(), ApiEditPage\execute(), ApiDelete\execute(), ApiRollback\execute(), ApiUserrights\execute(), ApiAMCreateAccount\execute(), ApiLinkAccount\execute(), ApiResetPassword\execute(), ApiParse\execute(), ApiQueryRevisionsBase\extractDeprecatedContent(), ApiQueryWatchlist\extractOutputData(), ApiQueryInfo\extractPageInfo(), ApiQueryLogEvents\extractRowInfo(), ApiQueryRecentChanges\extractRowInfo(), ApiFeedContributions\feedItem(), HistoryPager\formatRow(), UsersPager\formatRow(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), ApiQueryLogEvents\getCacheMode(), Skin\getCategories(), Skin\getCategoryLinks(), ApiUpload\getChunkResult(), ApiUpload\getContextResult(), ApiQueryUserInfo\getCurrentUserInfo(), Skin\getDefaultModules(), UploadForm\getDescriptionSection(), ApiComparePages\getDiffRevision(), HistoryPager\getEndBody(), OutputPage\getHeadLinksArray(), HTMLForm\getHiddenFields(), OutputPage\getJSVars(), OutputPage\getLastSeenUserTalkRevId(), ApiQueryUserInfo\getLatestContributionTime(), EnhancedChangesList\getLineData(), DifferenceEngine\getMarkPatrolledLinkInfo(), PreferencesFormOOUI\getModifiedUser(), Skin\getNewtalks(), UploadForm\getOptionsSection(), Skin\getPageClasses(), ApiParse\getParsedContent(), ApiParse\getPoolKey(), DeletedContribsPager\getQueryInfo(), ActiveUsersPager\getQueryInfo(), UsersPager\getQueryInfo(), BlockListPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), ApiComparePages\getRevisionById(), DifferenceEngine\getRevisionHeader(), OutputPage\getRlClientContext(), LogEventsList\getShowHideLinks(), Skin\getSiteNotice(), UploadForm\getSourceSection(), HistoryPager\getStartBody(), ImageHistoryList\getThumbForLine(), ApiTokens\getTokenTypes(), LogEventsList\getTypeMenuDesc(), Skin\getUndeleteLink(), ApiOptions\getUserForUpdates(), ApiQueryInfo\getVisitingWatcherInfo(), ApiQueryInfo\getWatchedInfo(), ApiQueryInfo\getWatcherInfo(), ChangesList\getWatchlistExpiry(), ApiBase\getWatchlistUser(), OutputPage\headElement(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ApiPageSet\initFromRevIDs(), ChangesList\insertDateHeader(), ChangesList\insertDiffHist(), ChangesList\insertRollback(), Skin\lastModified(), LogPager\limitType(), DifferenceEngine\loadNewText(), DifferenceEngine\loadText(), ApiBase\logFeatureUsage(), ApiMain\logRequest(), ApiMergeHistory\merge(), ApiMove\movePage(), ApiMove\moveSubpages(), OutputPage\parserOptions(), ApiUpload\performStash(), ApiUpload\performUpload(), Skin\preloadExistence(), ApiQueryUserContribs\prepareQuery(), ApiTag\processIndividual(), ImportReporter\reportPage(), DifferenceEngine\revisionDeleteLink(), HistoryPager\revLink(), ApiQueryDeletedRevisions\run(), ApiQueryAllRevisions\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryWatchlist\run(), ApiQueryRevisions\run(), ApiQueryRecentChanges\run(), ApiUpload\selectUploadModule(), DifferenceEngine\setRevisions(), SkinTemplate\setupTemplateContext(), ApiComparePages\setVals(), ChangesList\showAsUnpatrolled(), DifferenceEngine\showDiffPage(), Skin\showEmailUser(), OutputPage\showPermissionsErrorPage(), HTMLForm\tryAuthorizedSubmit(), RevDelList\updateLog(), DifferenceEngine\userCanEdit(), OutputPage\userCanPreview(), ApiQueryBase\userCanSeeRevDel(), MediaWiki\Preferences\DefaultPreferencesFactory\validateSignature(), and ApiBase\validateToken().

◆ getWikiPage()

ContextSource::getWikiPage ( )

Get the WikiPage object.

May throw an exception if there's no Title object set or the Title object belongs to a special namespace that doesn't have WikiPage, so use first canUseWikiPage() to check whether this method can be called safely.

Since
1.19 Stable to override
Returns
WikiPage

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 112 of file ContextSource.php.

References getContext().

Referenced by SkinTemplate\buildContentNavigationUrls(), HistoryPager\curLink(), SkinTemplate\getFooterLinks(), OutputPage\getJSVars(), HistoryPager\getQueryInfo(), HistoryPager\historyLine(), and DifferenceEngine\renderNewRevision().

◆ msg()

ContextSource::msg (   $key,
  $params 
)

Get a Message object with context set Parameters are the same as wfMessage()

Since
1.18 Stable to override
Parameters
string | string[] | MessageSpecifier$keyMessage key, or array of keys, or a MessageSpecifier.
mixed...$params
Returns
Message

Implements MessageLocalizer.

Reimplemented in DerivativeContext.

Definition at line 184 of file ContextSource.php.

References getContext().

Referenced by UploadForm\__construct(), DeletedContribsPager\__construct(), ContribsPager\__construct(), ApiBase\addDeprecation(), OutputPage\addHelpLink(), DifferenceEngine\addLocalisedTitleTooltipsCb(), OutputPage\addReturnTo(), Skin\addToSidebar(), Skin\addToSidebarPlain(), OutputPage\addWikiMsgArray(), ApiQuerySiteinfo\appendSkins(), ImageHistoryList\beginImageHistoryList(), SkinTemplate\buildContentNavigationUrls(), Skin\buildFeedUrls(), SkinFallback\buildHelpfulInformationMessage(), Skin\buildNavUrls(), SkinTemplate\buildPersonalUrls(), SkinMustache\buildSearchProps(), ApiUpload\checkPermissions(), ApiBase\checkUserRightsAny(), ImportReporter\close(), ApiFormatBase\closePrinter(), FormatMetadata\collapseContactInfo(), Skin\doEditSectionLink(), ApiQueryTags\execute(), ApiOptions\execute(), ApiFeedWatchlist\execute(), ApiParse\execute(), FormatMetadata\exifMsg(), ApiQueryRevisionsBase\extractAllSlotInfo(), Skin\footerLink(), Skin\footerLinkTitle(), FormatMetadata\formatCoords(), OutputPage\formatPermissionsErrorMessage(), CategoryPager\formatRow(), UsersPager\formatRow(), ActiveUsersPager\formatRow(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), AllMessagesTablePager\formatValue(), LogEventsList\getActionSelectorDesc(), OOUIHTMLForm\getButtons(), VFormHTMLForm\getButtons(), PreferencesFormOOUI\getButtons(), HTMLForm\getButtons(), Skin\getCachedNotice(), Skin\getCategoryLinks(), Skin\getCopyright(), CategoryViewer\getCountMessage(), DifferenceEngine\getDiff(), EnhancedChangesList\getDiffHistLinks(), HistoryPager\getEmptyBody(), TablePager\getEmptyBody(), UploadForm\getExtensionsMessage(), ApiFeedRecentChanges\getFeedObject(), BlockListPager\getFieldNames(), ProtectedPagesPager\getFieldNames(), ImageListPager\getFieldNames(), AllMessagesTablePager\getFieldNames(), LogEventsList\getFiltersDesc(), ApiBase\getFinalParamDescription(), OutputPage\getHeadLinksArray(), CategoryViewer\getHTML(), CategoryViewer\getImageSection(), Skin\getLanguages(), EditWatchlistNormalHTMLForm\getLegend(), HTMLForm\getLegend(), TablePager\getLimitDropdown(), EnhancedChangesList\getLineData(), EnhancedChangesList\getLogText(), AlphabeticPager\getNavigationBar(), ReverseChronologicalPager\getNavigationBar(), TablePager\getNavigationBar(), Skin\getNewtalks(), UsersPager\getPageHeader(), CategoryViewer\getPagesSection(), BlockListPager\getRestrictionListHTML(), HistoryPager\getRevisionButton(), DifferenceEngine\getRevisionHeader(), UploadForm\getSourceSection(), HistoryPager\getStartBody(), AllMessagesTablePager\getStartBody(), CategoryViewer\getSubcategorySection(), HTMLForm\getSubmitText(), SkinMustache\getTemplateData(), ImageHistoryList\getThumbForLine(), Skin\getUndeleteLink(), SkinTemplate\getWatchLinkAttrs(), ChangesList\getWatchlistExpiry(), ApiUpload\handleStashException(), OutputPage\headElement(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ChangesList\insertComment(), ChangesList\insertLog(), ChangesList\insertUserRelatedLinks(), FormatMetadata\langItem(), Skin\lastModified(), DifferenceEngine\localiseLineNumbersCb(), Skin\logoText(), Skin\mainPageLink(), FormatMetadata\makeFormattedData(), IndexPager\makeLink(), Skin\makeLink(), Skin\makeSearchButton(), Skin\makeSearchInput(), DifferenceEngine\markPatrolledLink(), ApiMain\modifyHelp(), ChangesList\numberofWatchingusers(), CategoryViewer\pagingLinks(), ChangesList\preCacheMessages(), Skin\printSource(), AllMessagesTablePager\reallyDoQuery(), EnhancedChangesList\recentChangesBlockGroup(), ImportReporter\reportNotice(), ImportReporter\reportPage(), OutputPage\setPageTitle(), HTMLForm\setSubmitTextMsg(), HTMLForm\setWrapperLegendMsg(), DifferenceEngine\showDiffPage(), OutputPage\showErrorPage(), OutputPage\showFatalError(), DifferenceEngine\showMissingRevision(), LogEventsList\showOptions(), OutputPage\showPermissionsErrorPage(), Skin\subPageSubtitle(), ApiMain\substituteResultWithError(), TraditionalImageGallery\toHTML(), MediaWiki\Preferences\DefaultPreferencesFactory\validateSignature(), OutputPage\versionRequired(), and OutputPage\wrapWikiMsg().

◆ setContext()

Member Data Documentation

◆ $context

IContextSource ContextSource::$context
private

Definition at line 34 of file ContextSource.php.

Referenced by PackedImageGallery\__construct(), SlideshowImageGallery\__construct(), ChangeTagsList\__construct(), CategoryPager\__construct(), RevDelList\__construct(), OOUIHTMLForm\__construct(), TablePager\__construct(), NewFilesPager\__construct(), UploadForm\__construct(), EnhancedChangesList\__construct(), ImageListPager\__construct(), ImageHistoryList\__construct(), ActiveUsersPager\__construct(), DeletedContribsPager\__construct(), UsersPager\__construct(), AllMessagesTablePager\__construct(), LogEventsList\__construct(), CategoryViewer\__construct(), ContribsPager\__construct(), ImageGalleryBase\__construct(), IndexPager\__construct(), ApiMain\__construct(), DifferenceEngine\__construct(), HTMLForm\__construct(), OutputPage\__construct(), ApiFormatBase\closePrinter(), ApiHelp\execute(), ApiFeedRecentChanges\execute(), ApiComparePages\execute(), ApiParse\execute(), ApiQueryUsers\execute(), ApiQueryRevisionsBase\extractDeprecatedContent(), ChangeTagsList\factory(), ImageGalleryBase\factory(), ChangesList\flag(), FormatMetadata\flattenArrayContentLang(), getContext(), FormatMetadata\getFormattedData(), ApiHelp\getHelp(), ApiHelp\getHelpInternal(), OutputPage\getRlClient(), DifferenceEngine\getSlotDiffRenderers(), ApiCSPReport\logReport(), ApiBase\makeMessage(), ChangesList\newFromContext(), ApiPageSet\processTitlesArray(), setContext(), ChangesList\showCharacterDifference(), LogEventsList\showLogExtract(), and LogEventsList\showOptions().


The documentation for this class was generated from the following file: