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 ()
 
 getWikiPage ()
 Get the WikiPage object. More...
 
 msg ( $key)
 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.

Since
1.18

Definition at line 29 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
Returns
bool

Implements IContextSource.

Definition at line 91 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.

Returns
array
Since
1.21

Implements IContextSource.

Definition at line 181 of file ContextSource.php.

References getContext().

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

◆ getConfig()

ContextSource::getConfig ( )
Since
1.23
Returns
Config

Implements IContextSource.

Definition at line 63 of file ContextSource.php.

References getContext().

Referenced by ApiQueryQueryPage\__construct(), ActiveUsersPager\__construct(), ImageListPager\__construct(), ApiQuery\__construct(), ImageGalleryBase\__construct(), ApiMain\__construct(), HTMLForm\__construct(), OutputPage\adaptCdnTTL(), OutputPage\addFeedLink(), OutputPage\addParserOutputMetadata(), ApiMain\addRequestedFields(), Skin\addToSidebarPlain(), UploadForm\addUploadJS(), ApiQuerySiteinfo\appendDbReplLagInfo(), ApiQuerySiteinfo\appendExtensions(), ApiQuerySiteinfo\appendFileExtensions(), ApiQuerySiteinfo\appendGeneralInfo(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendLanguageVariants(), ApiQuerySiteinfo\appendNamespaceAliases(), ApiQuerySiteinfo\appendProtocols(), ApiQuerySiteinfo\appendRestrictions(), ApiQuerySiteinfo\appendRightsInfo(), ApiQuerySiteinfo\appendSubscribedHooks(), ApiQuerySiteinfo\appendUploadDialog(), ApiQuerySiteinfo\appendUserGroups(), AllMessagesTablePager\buildForm(), ApiMain\checkBotReadOnly(), ApiMain\checkConditionalRequestHeaders(), OutputPage\checkLastModified(), ApiMain\checkMaxLag(), ApiUpload\checkVerification(), ApiBase\dieWithErrorOrDebug(), OutputPage\disallowUserJs(), ApiMain\errorMessagesFromException(), ApiProtect\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiUpload\execute(), ApiEditPage\execute(), ApiFormatPhp\execute(), ApiQueryBlocks\execute(), ApiQueryAllMessages\execute(), ApiChangeAuthenticationData\execute(), ApiQueryAuthManagerInfo\execute(), ApiQueryAllUsers\execute(), ApiQueryFileRepoInfo\execute(), ApiFeedRecentChanges\execute(), ApiQueryLogEvents\execute(), ApiFeedContributions\execute(), ApiRemoveAuthenticationData\execute(), ApiSetPageLanguage\execute(), ApiFeedWatchlist\execute(), ApiResetPassword\execute(), ApiLogin\execute(), ApiOpenSearch\execute(), ApiQueryUsers\execute(), ApiQueryRevisionsBase\extractDeprecatedContent(), OldChangesList\formatChangeLine(), UsersPager\formatRow(), HTMLForm\getAction(), ApiImport\getAllowedImportSources(), ApiQueryLogEvents\getAllowedLogActions(), ApiResetPassword\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryAllRevisions\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryAllDeletedRevisions\getAllowedParams(), ApiQueryUserContribs\getAllowedParams(), HTMLForm\getButtons(), ApiQuerySiteinfo\getCacheMode(), OutputPage\getCacheVaryCookies(), ApiUpload\getChunkResult(), OutputPage\getCSPNonce(), ApiQueryUserInfo\getCurrentUserInfo(), Skin\getDefaultModules(), ImageListPager\getDefaultSort(), UploadForm\getDescriptionSection(), DifferenceEngine\getDiffBodyCacheKeyParams(), ApiResetPassword\getExamplesMessages(), ApiSetPageLanguage\getExtendedDescription(), ApiLogin\getExtendedDescription(), UploadForm\getExtensionsMessage(), ImageListPager\getFieldNames(), ApiCSPReport\getFlags(), ImageListPager\getForm(), OutputPage\getFrameOptions(), OutputPage\getHeadLinksArray(), HTMLForm\getHiddenFields(), CategoryViewer\getHTML(), HTMLButtonField\getInputHTML(), EnhancedChangesList\getLineData(), ApiMain\getMaxLag(), ApiBase\getModuleSourceInfo(), ApiPageSet\getPageTableFields(), NewFilesPager\getQueryInfo(), ActiveUsersPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), OutputPage\getResourceLoader(), UploadForm\getSourceSection(), ApiQueryInfo\getVisitingWatcherInfo(), ApiQueryInfo\getWatcherInfo(), ApiMain\handleCORS(), ApiResetPassword\hasAnyRoutes(), OutputPage\headElement(), ApiFormatBase\initPrinter(), ApiLogin\isDeprecated(), ImageListPager\isFieldSortable(), ContribsPager\isQueryableRange(), ApiQueryImageInfo\mergeThumbParams(), OutputPage\output(), ApiMain\printResult(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), ChangesList\recentChangesFlags(), ApiQueryInfo\requestExtraData(), ApiBase\requirePostedParameters(), ApiQueryAllRevisions\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryExtLinksUsage\run(), ApiQuerySearch\run(), ApiQueryQueryPage\run(), ApiQueryCategoryMembers\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryBacklinksprop\run(), OutputPage\sendCacheControl(), ApiMain\sendCacheHeaders(), HTMLForm\setDisplayFormat(), OutputPage\setFeedAppendQuery(), ApiMain\setRequestExpectations(), SkinTemplate\setupTemplate(), OutputPage\showLagWarning(), LogEventsList\showOptions(), OutputPage\styleLink(), and ApiMain\substituteResultWithError().

◆ getContext()

ContextSource::getContext ( )

Get the base IContextSource object.

Since
1.18
Returns
IContextSource

Definition at line 40 of file ContextSource.php.

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

Referenced by ApiMain\__construct(), ApiBase\__construct(), OutputPage\addSubtitle(), EditPageTest\assertEdit(), SkinTemplate\buildContentNavigationUrls(), UsersPager\buildGroupLink(), SkinTemplate\buildNavUrls(), canUseWikiPage(), DerivativeContext\canUseWikiPage(), CategoryViewer\clearCategoryState(), ApiEmailUser\execute(), ApiHelp\execute(), ApiExpandTemplates\execute(), ApiRevisionDelete\execute(), ApiUnblock\execute(), ApiBlock\execute(), ApiOptions\execute(), ApiComparePages\execute(), ApiParse\execute(), ApiFeedContributions\execute(), ApiUserrights\execute(), ApiLogin\execute(), ApiQueryUsers\execute(), ApiMain\executeAction(), ApiMain\executeActionWithErrorHandling(), exportSession(), ApiQueryRevisionsBase\extractDeprecatedContent(), OutputPageTest\extractHTMLTitle(), ApiFeedContributions\feedItem(), ChangesList\formatCharacterDifference(), ContribsPager\formatRow(), ProtectedPagesPager\formatValue(), DifferenceEngine\generateContentDiffBody(), DifferenceEngine\generateTextDiffBody(), ApiUpload\getChunkResult(), getConfig(), DerivativeContext\getConfig(), ApiComparePages\getDiffRevision(), FormatMetadata\getExtendedMetadataFromHook(), ApiAMCreateAccount\getFinalDescription(), ApiLinkAccount\getFinalDescription(), ApiClientLogin\getFinalDescription(), ApiBase\getFinalDescription(), ApiBase\getFinalParamDescription(), ApiBase\getFinalSummary(), ImageListPager\getForm(), 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(), ApiUserrights\getUrUser(), getUser(), DerivativeContext\getUser(), getWikiPage(), DerivativeContext\getWikiPage(), OutputPage\headElement(), ChangesList\insertLog(), ChangesList\insertLogEntry(), ChangesList\insertRollback(), LogEventsList\logLine(), ApiParse\makeParserOptions(), msg(), SkinTemplate\outputPage(), OutputPage\parserOptions(), ApiUpload\performUpload(), SkinTemplate\prepareQuickTemplate(), 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(), ArticleViewTest\testArticleAfterFetchContentObjectHook(), ArticleViewTest\testArticleContentViewCustomHook(), ArticleViewTest\testArticleRevisionViewCustomHook(), ArticleViewTest\testArticleViewHeaderHook(), EditPageTest\testCheckDirectEditingDisallowed_forNonTextContent(), ApiStructureTest\testDocumentationExists(), OldChangesListTest\testRecentChangesLine_prefix(), EnhancedChangesListTest\testRecentChangesPrefix(), ArticleViewTest\testShowMissingArticleHook(), ArticleViewTest\testUnhiddenViewOfDeletedRevision(), ArticleViewTest\testView(), ArticleViewTest\testViewCached(), ArticleViewTest\testViewDeletedPage(), ArticleViewTest\testViewMessagePage(), ArticleViewTest\testViewMissingPage(), ArticleViewTest\testViewMissingUserPage(), ArticleViewTest\testViewNonText(), ArticleViewTest\testViewOfCurrentRevision(), ArticleViewTest\testViewOfDeletedRevision(), ArticleViewTest\testViewOfMissingRevision(), ArticleViewTest\testViewOfOldRevision(), ArticleViewTest\testViewRedirect(), ArticleViewTest\testViewUserPageOfNonexistingUser(), and DifferenceEngine\textDiff().

◆ getLanguage()

ContextSource::getLanguage ( )
Since
1.19
Returns
Language

Implements IContextSource.

Definition at line 128 of file ContextSource.php.

References getContext().

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

◆ getOutput()

ContextSource::getOutput ( )
Since
1.18
Returns
OutputPage

Implements IContextSource.

Definition at line 112 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(), SkinTemplate\buildNavUrls(), ApiMain\checkConditionalRequestHeaders(), ImportReporter\close(), HTMLForm\displayForm(), TablePager\getBody(), Skin\getCachedNotice(), Skin\getCategories(), Skin\getCategoryLinks(), Skin\getDefaultModules(), HTMLForm\getErrorsOrWarnings(), VFormHTMLForm\getHTML(), CategoryViewer\getHTML(), HTMLForm\getHTML(), CategoryViewer\getImageSection(), SkinTemplate\getLanguages(), DifferenceEngine\getMarkPatrolledLinkInfo(), TablePager\getNavigationBar(), Skin\getNewtalks(), CategoryViewer\getPagesSection(), Skin\getRevisionId(), ApiMain\handleCORS(), Skin\lastModified(), ImportReporter\open(), SkinTemplate\outputPage(), ImageListPager\outputUserDoesNotExist(), SkinTemplate\prepareQuickTemplate(), DifferenceEngine\renderNewRevision(), ImportReporter\reportNotice(), ImportReporter\reportPage(), ApiMain\sendCacheHeaders(), DifferenceEngine\showDiff(), DifferenceEngine\showDiffPage(), CustomDifferenceEngine\showDiffStyle(), DifferenceEngine\showDiffStyle(), DifferenceEngine\showMissingRevision(), LoginHelper\showReturnToPage(), Skin\subPageSubtitle(), and TraditionalImageGallery\toHTML().

◆ getRequest()

ContextSource::getRequest ( )
Since
1.18
Returns
WebRequest

Implements IContextSource.

Definition at line 71 of file ContextSource.php.

References getContext().

Referenced by TablePager\__construct(), ApiContinuationManager\__construct(), UsersPager\__construct(), AllMessagesTablePager\__construct(), ImageListPager\__construct(), IndexPager\__construct(), ApiMain\__construct(), OutputPage\addAcceptLanguage(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), OutputPage\checkLastModified(), ApiMain\checkMaxLag(), CategoryViewer\clearCategoryState(), ApiFormatBase\closePrinter(), ApiMain\createErrorPrinter(), ApiCSPReport\error(), ApiCheckToken\execute(), ApiEditPage\execute(), ApiQueryTokens\execute(), ApiQueryDeletedrevs\execute(), ApiCSPReport\execute(), ApiFeedRecentChanges\execute(), ApiLogin\execute(), ApiMain\executeActionWithErrorHandling(), OOUIHTMLForm\getButtons(), HTMLForm\getButtons(), ApiQueryUserInfo\getCurrentUserInfo(), LogEventsList\getDefaultQuery(), IndexPager\getDefaultQuery(), LogPager\getFilterParams(), ImageListPager\getForm(), 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(), 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\setupTemplateForOutput(), DifferenceEngine\showDiffPage(), OutputPage\showPermissionsErrorPage(), HTMLForm\tryAuthorizedSubmit(), OutputPage\userCanPreview(), ApiBase\useTransactionalTimeLimit(), ApiBase\validateToken(), and ApiCSPReport\verifyPostBodyOk().

◆ getSkin()

ContextSource::getSkin ( )

◆ getStats()

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

Implements IContextSource.

Definition at line 154 of file ContextSource.php.

◆ getTiming()

ContextSource::getTiming ( )
Since
1.27
Returns
Timing

Implements IContextSource.

Definition at line 144 of file ContextSource.php.

References getContext().

◆ getTitle()

◆ getUser()

ContextSource::getUser ( )
Since
1.18
Returns
User

Implements IContextSource.

Definition at line 120 of file ContextSource.php.

References getContext().

Referenced by UploadForm\__construct(), LogEventsList\__construct(), IndexPager\__construct(), ImageHistoryList\beginImageHistoryList(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiMain\canApiHighLimits(), ApiMain\checkAsserts(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), OutputPage\checkLastModified(), ApiMain\checkReadOnly(), ApiQueryRevisionsBase\checkRevDel(), ApiBase\checkTitleUserPermissions(), ApiBase\checkUserRightsAny(), DifferenceEngine\deletedLink(), ApiQuery\doExport(), LogPager\enforceActionRestrictions(), LogPager\enforcePerformerRestrictions(), ApiBase\errorArrayToStatus(), ApiValidatePassword\execute(), ApiImageRotate\execute(), ApiProtect\execute(), ApiManageTags\execute(), ApiUndelete\execute(), ApiMove\execute(), ApiEmailUser\execute(), ApiClearHasMsg\execute(), ApiImport\execute(), ApiWatch\execute(), ApiCheckToken\execute(), ApiUpload\execute(), ApiEditPage\execute(), ApiPurge\execute(), ApiLogout\execute(), ApiQueryStashImageInfo\execute(), ApiQueryTokens\execute(), ApiRevisionDelete\execute(), ApiTag\execute(), ApiUnblock\execute(), ApiQueryBlocks\execute(), ApiQueryMyStashedFiles\execute(), ApiSetNotificationTimestamp\execute(), ApiPatrol\execute(), ApiFileRevert\execute(), ApiChangeAuthenticationData\execute(), ApiDelete\execute(), ApiBlock\execute(), ApiQueryAuthManagerInfo\execute(), ApiRollback\execute(), ApiQueryDeletedrevs\execute(), ApiQueryFilearchive\execute(), ApiCSPReport\execute(), ApiParse\execute(), ApiQueryImageInfo\execute(), ApiQueryLogEvents\execute(), ApiRemoveAuthenticationData\execute(), ApiSetPageLanguage\execute(), ApiStashEdit\execute(), ApiUserrights\execute(), ApiLinkAccount\execute(), ApiAMCreateAccount\execute(), ApiResetPassword\execute(), ApiQueryRevisionsBase\extractDeprecatedContent(), ApiQueryWatchlist\extractOutputData(), ApiQueryInfo\extractPageInfo(), ApiQueryLogEvents\extractRowInfo(), ApiQueryRecentChanges\extractRowInfo(), DeletedContribsPager\formatRevisionRow(), UsersPager\formatRow(), ContribsPager\formatRow(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), ImageListPager\formatValue(), ApiQueryLogEvents\getCacheMode(), Skin\getCategories(), Skin\getCategoryLinks(), ApiUpload\getChunkResult(), ApiUpload\getContextResult(), ApiQueryUserInfo\getCurrentUserInfo(), Skin\getDefaultModules(), UploadForm\getDescriptionSection(), ApiComparePages\getDiffRevision(), OutputPage\getHeadLinksArray(), HTMLForm\getHiddenFields(), OutputPage\getJSVars(), EnhancedChangesList\getLineData(), EnhancedChangesList\getLogText(), DifferenceEngine\getMarkPatrolledLinkInfo(), PreferencesFormOOUI\getModifiedUser(), Skin\getNewtalks(), UploadForm\getOptionsSection(), ApiParse\getParsedContent(), NewPagesPager\getQueryInfo(), DeletedContribsPager\getQueryInfo(), ActiveUsersPager\getQueryInfo(), UsersPager\getQueryInfo(), ContribsPager\getQueryInfo(), BlockListPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), ApiComparePages\getRevisionById(), DifferenceEngine\getRevisionHeader(), OutputPage\getRlClientContext(), LogEventsList\getShowHideLinks(), Skin\getSiteNotice(), UploadForm\getSourceSection(), ImageHistoryList\getThumbForLine(), ApiTokens\getTokenTypes(), LogEventsList\getTypeMenuDesc(), Skin\getUndeleteLink(), ApiOptions\getUserForUpdates(), ApiQueryInfo\getVisitingWatcherInfo(), ApiQueryInfo\getWatchedInfo(), ApiQueryInfo\getWatcherInfo(), ApiBase\getWatchlistUser(), ApiBase\getWatchlistValue(), OutputPage\headElement(), ImageHistoryList\imageHistoryLine(), ApiPageSet\initFromRevIDs(), ChangesList\insertDateHeader(), ChangesList\insertDiffHist(), Skin\lastModified(), LogPager\limitType(), DifferenceEngine\loadNewText(), DifferenceEngine\loadText(), ApiBase\logFeatureUsage(), LogEventsList\logLine(), ApiMain\logRequest(), ApiMergeHistory\merge(), ApiMove\movePage(), OutputPage\parserOptions(), ApiUpload\performStash(), ApiUpload\performUpload(), Skin\preloadExistence(), ApiQueryUserContribs\prepareQuery(), ApiTag\processIndividual(), DifferenceEngine\renderNewRevision(), ImportReporter\reportPage(), DifferenceEngine\revisionDeleteLink(), ApiQueryDeletedRevisions\run(), ApiQueryAllRevisions\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryWatchlist\run(), ApiQueryRevisions\run(), ApiQueryRecentChanges\run(), ApiUpload\selectUploadModule(), DifferenceEngine\setRevisions(), ApiMain\setupExternalResponse(), SkinTemplate\setupTemplateForOutput(), ApiComparePages\setVals(), ApiBase\setWatch(), ChangesList\showAsUnpatrolled(), DifferenceEngine\showDiffPage(), Skin\showEmailUser(), ApiQueryBase\showHiddenUsersAddBlockInfo(), OutputPage\showPermissionsErrorPage(), HTMLForm\tryAuthorizedSubmit(), RevDelList\updateLog(), OutputPage\userCanPreview(), ApiQueryBase\userCanSeeRevDel(), 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
Returns
WikiPage

Implements IContextSource.

Definition at line 104 of file ContextSource.php.

References getContext().

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

◆ msg()

ContextSource::msg (   $key)

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

Since
1.18
Parameters
string|string[]|MessageSpecifier$key Message key, or array of keys, or a MessageSpecifier.
mixed$args,...
Returns
Message

Implements MessageLocalizer.

Definition at line 168 of file ContextSource.php.

References $args, and getContext().

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

◆ setContext()

Member Data Documentation

◆ $context


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