MediaWiki  1.29.2
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 ()
 Get the Config object. More...
 
 getContext ()
 Get the base IContextSource object. More...
 
 getLanguage ()
 Get the Language object. More...
 
 getOutput ()
 Get the OutputPage object. More...
 
 getRequest ()
 Get the WebRequest object. More...
 
 getSkin ()
 Get the Skin object. More...
 
 getStats ()
 Get the Stats object. More...
 
 getTiming ()
 Get the Timing object. More...
 
 getTitle ()
 Get the Title object. More...
 
 getUser ()
 Get the User object. More...
 
 getWikiPage ()
 Get the WikiPage object. More...
 
 msg ()
 Get a Message object with context set Parameters are the same as wfMessage() More...
 
 setContext (IContextSource $context)
 Set the IContextSource object. More...
 

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 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
Returns
bool

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 100 of file ContextSource.php.

References getContext().

Referenced by SkinTemplate\buildContentNavigationUrls(), SimpleCaptcha\confirmEditMerged(), 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 200 of file ContextSource.php.

References getContext().

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

◆ getConfig()

ContextSource::getConfig ( )

Get the Config object.

Since
1.23
Returns
Config

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 68 of file ContextSource.php.

References getContext().

Referenced by ApiQueryQueryPage\__construct(), ActiveUsersPager\__construct(), ImageListPager\__construct(), ImageGalleryBase\__construct(), ApiQuery\__construct(), ApiMain\__construct(), HTMLForm\__construct(), OutputPage\adaptCdnTTL(), OutputPage\addFeedLink(), OutputPage\addLogoPreloadLinkHeaders(), OutputPage\addParserOutputMetadata(), ApiMain\addRequestedFields(), OutputPage\addScriptFile(), Skin\addToSidebarPlain(), UploadForm\addUploadJS(), AllMessagesTablePager\buildForm(), ProtectionForm\buildForm(), ChangeTags\buildTagFilterSelector(), SpecialPageLanguage\changePageLanguage(), ApiMain\checkBotReadOnly(), ApiMain\checkConditionalRequestHeaders(), OutputPage\checkLastModified(), ApiMain\checkMaxLag(), ApiUpload\checkVerification(), ApiFormatBase\closePrinter(), ApiBase\dieWithErrorOrDebug(), OutputPage\disallowUserJs(), Preferences\editingPreferences(), ApiMain\errorMessagesFromException(), ApiProtect\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiChangeAuthenticationData\execute(), ApiUpload\execute(), ApiFormatPhp\execute(), ApiEditPage\execute(), ApiQueryAuthManagerInfo\execute(), ApiQueryAllMessages\execute(), ApiQueryBlocks\execute(), ApiPurge\execute(), ApiFeedContributions\execute(), ApiQueryFileRepoInfo\execute(), ApiQueryLogEvents\execute(), ApiFeedRecentChanges\execute(), ApiRemoveAuthenticationData\execute(), ApiQueryAllUsers\execute(), ApiSetPageLanguage\execute(), ApiFeedWatchlist\execute(), ApiResetPassword\execute(), ApiLogin\execute(), ApiOpenSearch\execute(), ApiQueryUsers\execute(), SpecialPageFactory\executePath(), ApiQueryRevisionsBase\extractRevisionInfo(), OldChangesList\formatChangeLine(), UsersPager\formatRow(), HistoryPager\formatRow(), Preferences\generateSkinOptions(), 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(), ApiQueryAllUsers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryAllDeletedRevisions\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryContributions\getAllowedParams(), HTMLForm\getButtons(), OutputPage\getCacheVaryCookies(), ApiUpload\getChunkResult(), ApiQueryUserInfo\getCurrentUserInfo(), ReverseChronologicalPager\getDateCond(), ApiSetPageLanguage\getDescriptionMessage(), ApiLogin\getDescriptionMessage(), UploadForm\getDescriptionSection(), HistoryPager\getEndBody(), ApiResetPassword\getExamplesMessages(), UploadForm\getExtensionsMessage(), ImageListPager\getFieldNames(), ApiCSPReport\getFlags(), OutputPage\getFrameOptions(), OutputPage\getHeadLinksArray(), HTMLForm\getHiddenFields(), CategoryViewer\getHTML(), Preferences\getImageSizes(), HTMLButtonField\getInputHTML(), EnhancedChangesList\getLineData(), ApiMain\getMaxLag(), ApiBase\getModuleSourceInfo(), ApiPageSet\getPageTableFields(), NewFilesPager\getQueryInfo(), ActiveUsersPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), OutputPage\getResourceLoader(), ResourceLoaderUploadDialogModule\getScript(), UploadForm\getSourceSection(), Preferences\getThumbSizes(), Preferences\getTimezoneOptions(), ApiQueryInfo\getVisitingWatcherInfo(), ApiQueryInfo\getWatcherInfo(), ApiMain\handleCORS(), ApiResetPassword\hasAnyRoutes(), OutputPage\headElement(), ApiFormatBase\initPrinter(), ApiLogin\isDeprecated(), ImageListPager\isFieldSortable(), OutputPage\isUserCssPreview(), OutputPage\isUserJsPreview(), Preferences\loadPreferenceValues(), ChangesListSpecialPage\makeLegend(), ApiQueryImageInfo\mergeThumbParams(), ApiMain\modifyHelp(), CiteHooks\onResourceLoaderTestModules(), RawAction\onView(), OutputPage\output(), ApiMain\printResult(), Preferences\profilePreferences(), Preferences\rcPreferences(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), ChangesList\recentChangesFlags(), Preferences\renderingPreferences(), ApiQueryInfo\requestExtraData(), ApiBase\requirePostedParameters(), ApiQueryAllRevisions\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryExtLinksUsage\run(), ApiQuerySearch\run(), ApiQueryQueryPage\run(), ApiQueryAllPages\run(), ApiQueryCategoryMembers\run(), ApiQueryAllImages\run(), ApiQueryBacklinksprop\run(), OutputPage\sendCacheControl(), ApiMain\sendCacheHeaders(), HTMLForm\setDisplayFormat(), OutputPage\setFeedAppendQuery(), ApiMain\setRequestExpectations(), SkinTemplate\setupTemplate(), OutputPage\showLagWarning(), Preferences\skinPreferences(), OutputPage\styleLink(), SpecialEmailUser\submit(), ApiMain\substituteResultWithError(), ApiFormatPhpTest\testCrossDomainMangling(), ApiMainTest\testExceptionErrors(), and Preferences\watchlistPreferences().

◆ getContext()

ContextSource::getContext ( )

Get the base IContextSource object.

Since
1.18
Returns
IContextSource

Definition at line 41 of file ContextSource.php.

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

Referenced by ApiMain\__construct(), ApiBase\__construct(), RevisionItem\__construct(), OutputPage\addSubtitle(), SkinTemplate\buildContentNavigationUrls(), UsersPager\buildGroupLink(), SkinTemplate\buildNavUrls(), canUseWikiPage(), DerivativeContext\canUseWikiPage(), ApiParse\categoriesHtml(), CategoryViewer\clearCategoryState(), SimpleCaptcha\editShowCaptcha(), ApiComparePages\execute(), ApiEmailUser\execute(), ApiRevisionDelete\execute(), ApiExpandTemplates\execute(), ApiHelp\execute(), ApiOptions\execute(), ApiUnblock\execute(), ApiParse\execute(), ApiFeedContributions\execute(), ApiBlock\execute(), ApiUserrights\execute(), ApiLogin\execute(), ApiQueryUsers\execute(), ApiMain\executeAction(), ApiMain\executeActionWithErrorHandling(), exportSession(), ApiQueryRevisionsBase\extractRevisionInfo(), ApiFeedContributions\feedItem(), ChangesList\formatCharacterDifference(), ContribsPager\formatRow(), ProtectedPagesPager\formatValue(), ApiUpload\getChunkResult(), getConfig(), DerivativeContext\getConfig(), FormatMetadata\getExtendedMetadataFromHook(), ApiAMCreateAccount\getFinalDescription(), ApiLinkAccount\getFinalDescription(), ApiClientLogin\getFinalDescription(), ApiBase\getFinalDescription(), ApiBase\getFinalParamDescription(), OutputPage\getHeadLinksArray(), OutputPage\getJSVars(), getLanguage(), DerivativeContext\getLanguage(), EditWatchlistNormalHTMLForm\getLegend(), getOutput(), DerivativeContext\getOutput(), DifferenceEngine\getParserOutput(), getRequest(), DerivativeContext\getRequest(), getSkin(), DerivativeContext\getSkin(), UploadForm\getSourceSection(), NewFilesPager\getStartBody(), CategoryPager\getStartForm(), DerivativeContext\getTiming(), getTiming(), getTitle(), DerivativeContext\getTitle(), HTMLForm\getTitle(), ApiUserrights\getUrUser(), getUser(), DerivativeContext\getUser(), getWikiPage(), DerivativeContext\getWikiPage(), OutputPage\headElement(), HistoryPager\historyLine(), 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(), OutputPage\setHTMLTitle(), OutputPage\setPageTitle(), OutputPage\setTitle(), SideBarTest\setUp(), SpecialComparePages\showDiff(), DifferenceEngine\showDiffPage(), LogEventsList\showOptions(), SkinTemplate\tabAction(), ApiDocumentationTest\testDocumentationExists(), AbstractChangesListSpecialPageTestCase\testParseParameters(), Preferences\tryUISubmit(), and SpecialEmailUser\uiSubmit().

◆ getLanguage()

ContextSource::getLanguage ( )

Get the Language object.

Since
1.19
Returns
Language

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 143 of file ContextSource.php.

References getContext().

Referenced by AllMessagesTablePager\__construct(), ApiMain\__construct(), DifferenceEngine\addHeader(), OutputPage\addInlineStyle(), ApiMain\addRequestedFields(), OutputPage\buildExemptModules(), ProtectionForm\buildForm(), SpecialPageFactory\capturePath(), Preferences\datetimePreferences(), Article\delete(), OutputPage\enableOOUI(), ApiHelp\execute(), ApiLogout\execute(), ApiQueryAllMessages\execute(), ApiParamInfo\execute(), ApiFeedWatchlist\execute(), FormatMetadata\fetchExtendedMetadata(), OldChangesList\formatChangeLine(), ApiParse\formatLangLinks(), SkinTemplate\formatLanguageName(), FormatMetadata\formatNum(), CategoryPager\formatRow(), NewFilesPager\formatRow(), ActiveUsersPager\formatRow(), UsersPager\formatRow(), ContribsPager\formatRow(), ChangeTags\formatSummaryRow(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), AllMessagesTablePager\formatValue(), Preferences\generateSkinOptions(), ChangesList\getArticleLink(), CacheHelper\getCachedNotice(), ResourceLoaderStartUpModule\getConfigSettings(), ResourceLoaderLanguageDataModule\getData(), ResourceLoaderLanguageNamesModule\getData(), Preferences\getDateOptions(), MWDebug\getDebugInfo(), UploadForm\getExtensionsMessage(), ResourceLoaderModule\getFileDependencies(), MWDebug\getFilesIncluded(), LogEventsList\getFilterLinks(), ListToggle\getHTML(), CategoryViewer\getHTML(), Skin\getHtmlElementAttributes(), SkinTemplate\getLanguages(), EditWatchlistNormalHTMLForm\getLegend(), ResourceLoaderEditToolbarModule\getLessVars(), IndexPager\getLimitLinks(), TablePager\getLimitSelectList(), UserGroupMembership\getLink(), ReverseChronologicalPager\getNavigationBar(), AlphabeticPager\getNavigationBar(), ResourceLoaderImage\getPath(), FormatMetadata\getPriorityLanguages(), ImageGalleryBase\getRenderLang(), DifferenceEngine\getRevisionHeader(), OutputPage\getRlClientContext(), AllMessagesTablePager\getRowAttrs(), ResourceLoaderLanguageNamesModule\getScript(), ResourceLoaderLanguageDataModule\getScript(), UploadForm\getSourceSection(), ImageHistoryList\getThumbForLine(), ChangesList\getTimestamp(), Preferences\getTimezoneOptions(), ResourceLoaderImage\getUrl(), OutputPage\headElement(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ChangesList\insertDateHeader(), ChangesList\insertLogEntry(), ChangesList\insertUserRelatedLinks(), Skin\lastModified(), LogEventsList\logLine(), FormatMetadata\makeFormattedData(), ParserOptions\newFromContext(), SkinTemplate\prepareQuickTemplate(), Preferences\profilePreferences(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesLine(), HistoryPager\revLink(), ResourceLoaderModule\saveFileDependencies(), ResourceLoaderModule\setFileDependencies(), Article\setOldSubtitle(), UploadFromUrlTestSuite\setUp(), OutputPage\showLagWarning(), DifferenceEngine\showMissingRevision(), Preferences\skinPreferences(), OutputPage\styleLink(), Skin\subPageSubtitle(), HTMLFileCache\useFileCache(), and Preferences\watchlistPreferences().

◆ getOutput()

ContextSource::getOutput ( )

Get the OutputPage object.

Since
1.18
Returns
OutputPage

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 123 of file ContextSource.php.

References getContext().

Referenced by OOUIHTMLForm\__construct(), CategoryViewer\__construct(), UploadForm\__construct(), UploadForm\addUploadJS(), EnhancedChangesList\beginRecentChangesList(), ChangesList\beginRecentChangesList(), Skin\bottomScripts(), SkinTemplate\buildContentNavigationUrls(), ProtectionForm\buildForm(), SkinTemplate\buildNavUrls(), SpecialPageFactory\capturePath(), ApiMain\checkConditionalRequestHeaders(), ImportReporter\close(), Article\delete(), HTMLForm\displayForm(), Article\doDelete(), SimpleCaptcha\editShowCaptcha(), RebuildFileCache\execute(), SpecialPageFactory\executePath(), TablePager\getBody(), Skin\getCachedNotice(), Skin\getCategories(), Skin\getCategoryLinks(), Skin\getDefaultModules(), HTMLForm\getErrorsOrWarnings(), VFormHTMLForm\getHTML(), CategoryViewer\getHTML(), HTMLForm\getHTML(), SkinTemplate\getLanguages(), DifferenceEngine\getMarkPatrolledLinkInfo(), Skin\getNewtalks(), UsersPager\getPageHeader(), Skin\getRevisionId(), HistoryPager\getStartBody(), ApiMain\handleCORS(), Skin\lastModified(), HTMLFileCache\loadFromFileCache(), onApiFormatHighlight(), ImportReporter\open(), SkinTemplate\outputPage(), ImageListPager\outputUserDoesNotExist(), MediaWiki\performRequest(), SkinTemplate\prepareQuickTemplate(), SpecialTags\processCreateTagForm(), SpecialTags\processTagForm(), Preferences\profilePreferences(), DifferenceEngine\renderNewRevision(), UserNotLoggedIn\report(), ImportReporter\reportNotice(), ImportReporter\reportPage(), ApiMain\sendCacheHeaders(), Article\setOldSubtitle(), UploadFromUrlTestSuite\setUp(), DifferenceEngine\showDiff(), DifferenceEngine\showDiffPage(), DifferenceEngine\showDiffStyle(), DifferenceEngine\showMissingRevision(), LogEventsList\showOptions(), Article\showRedirectedFromHeader(), LoginHelper\showReturnToPage(), Skin\subPageSubtitle(), MediaWikiTest\testTryNormaliseRedirect(), TraditionalImageGallery\toHTML(), and Preferences\tryUISubmit().

◆ getRequest()

ContextSource::getRequest ( )

Get the WebRequest object.

Since
1.18
Returns
WebRequest

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 78 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(), OutputPage\buildExemptModules(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), Linker\buildRollbackLink(), SpecialPageFactory\capturePath(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), OutputPage\checkLastModified(), ApiMain\checkMaxLag(), CategoryViewer\clearCategoryState(), ApiMain\createErrorPrinter(), Article\delete(), ApiTestCase\doApiRequest(), SimpleCaptcha\doConfirmEdit(), ApiCSPReport\error(), ApiCheckToken\execute(), ApiQueryTokens\execute(), ApiEditPage\execute(), ApiQueryDeletedrevs\execute(), ApiCSPReport\execute(), ApiFeedRecentChanges\execute(), ApiLogin\execute(), ApiMain\executeActionWithErrorHandling(), SpecialPageFactory\executePath(), SpecialPageExecutor\executeSpecialPage(), AuthManagerSpecialPage\getAuthForm(), LoginSignupSpecialPage\getAuthForm(), OutputPage\getBottomScripts(), OOUIHTMLForm\getButtons(), HTMLForm\getButtons(), CacheHelper\getCachedNotice(), ApiQueryUserInfo\getCurrentUserInfo(), MWDebug\getDebugInfo(), LogEventsList\getDefaultQuery(), IndexPager\getDefaultQuery(), LogEventsList\getExtraInputs(), LogPager\getFilterParams(), OutputPage\getHeadLinksArray(), TablePager\getHiddenFields(), ResourceLoaderStartUpModule\getModuleRegistrations(), ResourceLoaderUserModule\getPages(), ResourceLoaderUserStylesModule\getPages(), Block\getPermissionsError(), ApiCSPReport\getReport(), OutputPage\getRlClientContext(), UploadForm\getSourceSection(), NewFilesPager\getStartBody(), ApiTokens\getTokenTypes(), Skin\getUndeleteLink(), ApiMain\getUpload(), ApiMain\getUserAgent(), ApiMain\getVal(), ApiMain\handleCORS(), ApiMain\handleException(), OutputPage\haveCacheVaryCookies(), RequestContext\importScopedSession(), MediaWiki\initializeArticle(), ApiQuery\instantiateModules(), HTMLButtonField\isBadIE(), ApiMain\lacksSameOriginSecurity(), ProtectionForm\loadData(), HTMLForm\loadData(), ApiBase\logFeatureUsage(), ApiMain\logRequest(), MediaWiki\main(), OutputPage\output(), MediaWiki\parseTitle(), MediaWiki\performAction(), MediaWiki\performRequest(), HTMLForm\prepareForm(), SkinTemplate\prepareQuickTemplate(), SpecialTags\processCreateTagForm(), Preferences\profilePreferences(), UserNotLoggedIn\report(), ApiMain\reportUnusedParams(), ApiBase\requirePostedParameters(), OutputPage\returnToMain(), AssembleUploadChunksJob\run(), ApiQueryRecentChanges\run(), ProtectionForm\save(), OutputPage\sendCacheControl(), ApiMain\sendCacheHeaders(), User\setCookies(), SpecialPageExecutor\setEditTokenFromUser(), Article\setOldSubtitle(), ApiMain\setRequestExpectations(), LoginSignupSpecialPage\setSessionUserForCurrentRequest(), UploadFromUrlTestSuite\setUp(), ApiMain\setupExternalResponse(), SkinTemplate\setupTemplateForOutput(), SimpleCaptcha\shouldCheck(), DifferenceEngine\showDiffPage(), OutputPage\showPermissionsErrorPage(), Article\showRedirectedFromHeader(), DerivativeResourceLoaderContextTest\testAccessors(), MediaWiki\Session\SessionTest\testConstructor(), ActionTest\testGetActionName_revisiondeleteWorkaround(), RequestContextTest\testImportScopedSession(), HTMLForm\tryAuthorizedSubmit(), MediaWiki\tryNormaliseRedirect(), Preferences\tryUISubmit(), ResourceFileCache\useFileCache(), HTMLFileCache\useFileCache(), OutputPage\userCanPreview(), ApiBase\useTransactionalTimeLimit(), ApiBase\validateToken(), and ApiCSPReport\verifyPostBodyOk().

◆ getSkin()

◆ getStats()

ContextSource::getStats ( )

Get the Stats object.

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

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 175 of file ContextSource.php.

◆ getTiming()

ContextSource::getTiming ( )

Get the Timing object.

Since
1.27
Returns
Timing

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 163 of file ContextSource.php.

References getContext().

◆ getTitle()

ContextSource::getTitle ( )

Get the Title object.

Since
1.18
Returns
Title|null

Implements IContextSource.

Reimplemented in HTMLForm, ImageListPager, AllMessagesTablePager, DerivativeContext, ImageHistoryPseudoPager, and ProtectedTitlesPager.

Definition at line 88 of file ContextSource.php.

References getContext().

Referenced by OutputPage\addAcceptLanguage(), OutputPage\addParserOutputMetadata(), Skin\addToSidebarPlain(), OutputPage\addWikiText(), OutputPage\addWikiTextTidy(), SkinTemplate\buildContentNavigationUrls(), OutputPage\buildExemptModules(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), Linker\buildRollbackLink(), SimpleCaptcha\confirmEditMerged(), HistoryPager\curLink(), ApiEditPage\execute(), SpamBlacklistHooks\filterMergedContent(), HistoryPager\formatRow(), OutputPage\getBottomScripts(), CacheHelper\getCachedNotice(), Skin\getCategories(), Skin\getCategoryLinks(), Skin\getCopyright(), DifferenceEngine\getDiffLang(), HistoryPager\getEndBody(), LogEventsList\getFilterLinks(), OutputPage\getHeadLinksArray(), OutputPage\getJSVars(), SkinTemplate\getLanguages(), SkinTemplate\getNameSpaceKey(), UsersPager\getPageHeader(), Skin\getRelevantTitle(), HistoryPager\getStartBody(), Skin\getUndeleteLink(), OutputPage\headElement(), HistoryPager\historyLine(), WikitextContent\isCountable(), Skin\isRevisionCurrent(), OutputPage\isUserCssPreview(), OutputPage\isUserJsPreview(), HistoryPager\lastLink(), Skin\lastModified(), HTMLFileCache\loadFromFileCache(), DifferenceEngine\loadRevisionData(), DifferenceEngine\loadRevisionIds(), IndexPager\makeLink(), DifferenceEngine\mapDiffPrevNext(), GadgetHooks\onEditFilterMergedContent(), OutputPage\parse(), SkinTemplate\prepareQuickTemplate(), Skin\printSource(), Preferences\profilePreferences(), DifferenceEngine\renderNewRevision(), UserNotLoggedIn\report(), HistoryPager\revLink(), OutputPage\setFeedAppendQuery(), SkinTemplate\setupTemplateForOutput(), DifferenceEngine\showDiffPage(), RequestContextTest\testWikiPageTitle(), and OutputPage\userCanPreview().

◆ getUser()

ContextSource::getUser ( )

Get the User object.

Since
1.18
Returns
User

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 133 of file ContextSource.php.

References getContext().

Referenced by LogEventsList\__construct(), IndexPager\__construct(), HistoryPager\__construct(), UploadForm\__construct(), ImageHistoryList\beginImageHistoryList(), SkinTemplate\buildContentNavigationUrls(), ProtectionForm\buildForm(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), Linker\buildRollbackLink(), ApiMain\canApiHighLimits(), SpecialPageFactory\capturePath(), SpecialPageLanguage\changePageLanguage(), ApiMain\checkAsserts(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), OutputPage\checkLastModified(), ApiMain\checkReadOnly(), ApiBase\checkTitleUserPermissions(), ApiBase\checkUserRightsAny(), Article\delete(), DifferenceEngine\deletedLink(), Article\doDelete(), ApiQuery\doExport(), ApiBase\errorArrayToStatus(), ApiValidatePassword\execute(), ApiImageRotate\execute(), ApiManageTags\execute(), ApiTag\execute(), ApiClearHasMsg\execute(), ApiProtect\execute(), ApiUndelete\execute(), ApiMove\execute(), ApiCheckToken\execute(), ApiEmailUser\execute(), ApiQueryStashImageInfo\execute(), ApiRevisionDelete\execute(), ApiImport\execute(), ApiQueryMyStashedFiles\execute(), ApiWatch\execute(), ApiQueryTitleBlacklist\execute(), ApiQueryTokens\execute(), ApiChangeAuthenticationData\execute(), ApiUpload\execute(), ApiPatrol\execute(), ApiSetNotificationTimestamp\execute(), ApiOptions\execute(), ApiQueryAuthManagerInfo\execute(), ApiEditPage\execute(), ApiLogout\execute(), ApiUnblock\execute(), ApiQueryBlocks\execute(), ApiParse\execute(), ApiPurge\execute(), ApiQueryDeletedrevs\execute(), ApiFileRevert\execute(), ApiQueryFilearchive\execute(), ApiBlock\execute(), ApiDelete\execute(), ApiRollback\execute(), ApiCSPReport\execute(), ApiQueryLogEvents\execute(), ApiRemoveAuthenticationData\execute(), ApiQueryImageInfo\execute(), ApiStashEdit\execute(), ApiUserrights\execute(), ApiSetPageLanguage\execute(), ApiAMCreateAccount\execute(), ApiLinkAccount\execute(), ApiResetPassword\execute(), ApiQueryWatchlist\extractOutputData(), ApiQueryInfo\extractPageInfo(), ApiQueryRevisionsBase\extractRevisionInfo(), ApiQueryLogEvents\extractRowInfo(), ApiQueryRecentChanges\extractRowInfo(), UsersPager\formatRow(), ContribsPager\formatRow(), HistoryPager\formatRow(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), ApiQueryLogEvents\getCacheMode(), Skin\getCategories(), Skin\getCategoryLinks(), ApiUpload\getChunkResult(), ApiUpload\getContextResult(), ApiQueryUserInfo\getCurrentUserInfo(), UploadForm\getDescriptionSection(), HistoryPager\getEndBody(), LogPager\getFilterParams(), OutputPage\getHeadLinksArray(), HTMLForm\getHiddenFields(), OutputPage\getJSVars(), EnhancedChangesList\getLineData(), UserGroupMembership\getLink(), EnhancedChangesList\getLogText(), DifferenceEngine\getMarkPatrolledLinkInfo(), PreferencesForm\getModifiedUser(), Skin\getNewtalks(), UploadForm\getOptionsSection(), DifferenceEngine\getParserOutput(), Block\getPermissionsError(), NewPagesPager\getQueryInfo(), DeletedContribsPager\getQueryInfo(), ActiveUsersPager\getQueryInfo(), UsersPager\getQueryInfo(), ContribsPager\getQueryInfo(), BlockListPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), DifferenceEngine\getRevisionHeader(), OutputPage\getRlClientContext(), LogEventsList\getShowHideLinks(), Skin\getSiteNotice(), UploadForm\getSourceSection(), HistoryPager\getStartBody(), ImageHistoryList\getThumbForLine(), ApiTokens\getTokenTypes(), LogEventsList\getTypeSelector(), Skin\getUndeleteLink(), ApiQueryInfo\getVisitingWatcherInfo(), ApiQueryInfo\getWatchedInfo(), ApiQueryInfo\getWatcherInfo(), ApiBase\getWatchlistUser(), ApiBase\getWatchlistValue(), OutputPage\headElement(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), RequestContext\importScopedSession(), ApiPageSet\initFromRevIDs(), ChangesList\insertDateHeader(), ChangesList\insertDiffHist(), ChangesList\insertRollback(), ApiQueryGadgets\isNeeded(), Skin\lastModified(), LogPager\limitPerformer(), LogPager\limitTitle(), LogPager\limitType(), DifferenceEngine\loadNewText(), DifferenceEngine\loadText(), ApiBase\logFeatureUsage(), LogEventsList\logLine(), ApiMain\logRequest(), ChangesListSpecialPage\makeLegend(), ApiMergeHistory\merge(), ApiMove\movePage(), ParserOptions\newFromContext(), OutputPage\parserOptions(), ApiUpload\performStash(), ApiUpload\performUpload(), Skin\preloadExistence(), ApiQueryContributions\prepareQuery(), SpecialTags\processCreateTagForm(), SpecialBlock\processForm(), ApiTag\processIndividual(), SpecialTags\processTagForm(), SpecialUnblock\processUnblock(), Preferences\profilePreferences(), ImportReporter\reportPage(), DifferenceEngine\revisionDeleteLink(), HistoryPager\revLink(), AssembleUploadChunksJob\run(), PublishStashedFileJob\run(), ApiQueryDeletedRevisions\run(), ApiQueryAllRevisions\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryWatchlist\run(), ApiQueryRevisions\run(), ApiQueryRecentChanges\run(), ApiUpload\selectUploadModule(), SpecialPageExecutor\setEditTokenFromUser(), Article\setOldSubtitle(), ApiMain\setupExternalResponse(), SkinTemplate\setupTemplateForOutput(), ApiBase\setWatch(), SimpleCaptcha\shouldCheck(), ChangesList\showAsUnpatrolled(), DifferenceEngine\showDiffPage(), Skin\showEmailUser(), ApiQueryBase\showHiddenUsersAddBlockInfo(), OutputPage\showPermissionsErrorPage(), SpecialEmailUser\submit(), RequestContextTest\testImportScopedSession(), HTMLForm\tryAuthorizedSubmit(), RevDelList\updateLog(), HTMLFileCache\useFileCache(), 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.

Reimplemented in DerivativeContext.

Definition at line 113 of file ContextSource.php.

References getContext().

Referenced by SkinTemplate\buildContentNavigationUrls(), SimpleCaptcha\confirmEditMerged(), HistoryPager\curLink(), ActionTest\dummyActionCallback(), SpamBlacklistHooks\filterMergedContent(), OutputPage\getJSVars(), HistoryPager\getQueryInfo(), SkinTemplate\prepareQuickTemplate(), DifferenceEngine\renderNewRevision(), ActionTest\setUp(), ActionTest\testActionFactory(), and RequestContextTest\testWikiPageTitle().

◆ msg()

ContextSource::msg ( )

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

Since
1.18
Parameters
mixed...
Returns
Message

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 187 of file ContextSource.php.

References $args, and getContext().

Referenced by DeletedContribsPager\__construct(), AllMessagesTablePager\__construct(), ContribsPager\__construct(), UploadForm\__construct(), ApiBase\addDeprecation(), OutputPage\addHelpLink(), OutputPage\addReturnTo(), Skin\addToSidebarPlain(), OutputPage\addWikiMsgArray(), ImageHistoryList\beginImageHistoryList(), SkinTemplate\buildContentNavigationUrls(), AllMessagesTablePager\buildForm(), ProtectionForm\buildForm(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), Linker\buildRollbackLink(), ChangeTags\buildTagFilterSelector(), ListToggle\checkboxLink(), ApiUpload\checkPermissions(), ApiBase\checkUserRightsAny(), ImportReporter\close(), ApiFormatBase\closePrinter(), FormatMetadata\collapseContactInfo(), SimpleCaptcha\confirmEditMerged(), Article\delete(), Preferences\editingPreferences(), ApiOptions\execute(), ApiQueryTags\execute(), ApiParse\execute(), ApiFeedWatchlist\execute(), FormatMetadata\exifMsg(), ApiQueryRevisionsBase\extractRevisionInfo(), Skin\footerLink(), Skin\footerLinkTitle(), FormatMetadata\formatCoords(), OutputPage\formatPermissionsErrorMessage(), CategoryPager\formatRow(), ActiveUsersPager\formatRow(), UsersPager\formatRow(), ContribsPager\formatRow(), ChangeTags\formatSummaryRow(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), AllMessagesTablePager\formatValue(), Linker\generateRollback(), Preferences\generateSkinOptions(), OOUIHTMLForm\getButtons(), VFormHTMLForm\getButtons(), HTMLForm\getButtons(), PreferencesForm\getButtons(), CacheHelper\getCachedNotice(), Skin\getCachedNotice(), Skin\getCategoryLinks(), ResourceLoaderStartUpModule\getConfigSettings(), ApiParse\getContent(), Skin\getCopyright(), CategoryViewer\getCountMessage(), Preferences\getDateOptions(), DifferenceEngine\getDiff(), EnhancedChangesList\getDiffHistLinks(), TablePager\getEmptyBody(), ApiBase\getExamplesMessages(), UploadForm\getExtensionsMessage(), LogEventsList\getExtraInputs(), ApiFeedRecentChanges\getFeedObject(), BlockListPager\getFieldNames(), ProtectedPagesPager\getFieldNames(), ImageListPager\getFieldNames(), AllMessagesTablePager\getFieldNames(), LogEventsList\getFilterLinks(), ApiBase\getFinalDescription(), ApiBase\getFinalParamDescription(), Preferences\getFormObject(), OutputPage\getHeadLinksArray(), ListToggle\getHTML(), CategoryViewer\getHTML(), CategoryViewer\getImageSection(), Preferences\getImageSizes(), Linker\getInvalidTitleDescription(), EditWatchlistNormalHTMLForm\getLegend(), HTMLForm\getLegend(), TablePager\getLimitDropdown(), EnhancedChangesList\getLineData(), UserGroupMembership\getLink(), ApiQueryGadgetCategories\getList(), EnhancedChangesList\getLogText(), ReverseChronologicalPager\getNavigationBar(), AlphabeticPager\getNavigationBar(), TablePager\getNavigationBar(), Skin\getNewtalks(), UsersPager\getPageHeader(), CategoryViewer\getPagesSection(), Block\getPermissionsError(), EditPage\getPreviewText(), HistoryPager\getRevisionButton(), DifferenceEngine\getRevisionHeader(), CiteDataModule\getScript(), UploadForm\getSourceSection(), AllMessagesTablePager\getStartBody(), HistoryPager\getStartBody(), CategoryViewer\getSubcategorySection(), HTMLForm\getSubmitText(), ImageHistoryList\getThumbForLine(), Preferences\getThumbSizes(), Preferences\getTimezoneOptions(), LogEventsList\getTitleInput(), LogEventsList\getTitlePattern(), Skin\getUndeleteLink(), LogEventsList\getUserInput(), ApiUpload\handleStashException(), OutputPage\headElement(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ChangesList\insertComment(), ChangesList\insertDiffHist(), ChangesList\insertLog(), ChangesList\insertUserRelatedLinks(), FormatMetadata\langItem(), Skin\lastModified(), DifferenceEngine\localiseLineNumbersCb(), Skin\logoText(), Skin\mainPageLink(), FormatMetadata\makeFormattedData(), ChangesListSpecialPage\makeLegend(), DifferenceEngine\markPatrolledLink(), ApiMain\modifyHelp(), ChangesList\numberofWatchingusers(), CategoryViewer\pagingLinks(), ChangesList\preCacheMessages(), SkinTemplate\prepareQuickTemplate(), Skin\printSource(), Preferences\profilePreferences(), Preferences\rcPreferences(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), Preferences\renderingPreferences(), ImportReporter\reportNotice(), ImportReporter\reportPage(), Article\setOldSubtitle(), 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(), Article\showRedirectedFromHeader(), OutputPage\showUnexpectedValueError(), Preferences\skinPreferences(), SpecialEmailUser\submit(), Skin\subPageSubtitle(), ApiMain\substituteResultWithError(), ChangeTags\tagDescription(), TraditionalImageGallery\toHTML(), OutputPage\versionRequired(), Preferences\watchlistPreferences(), and OutputPage\wrapWikiMsg().

◆ setContext()

Member Data Documentation

◆ $context


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