MediaWiki REL1_28
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().
 
 exportSession ()
 Export the resolved user IP, HTTP headers, user ID, and session ID.
 
 getConfig ()
 Get the Config object.
 
 getContext ()
 Get the base IContextSource object.
 
 getLanguage ()
 Get the Language object.
 
 getOutput ()
 Get the OutputPage object.
 
 getRequest ()
 Get the WebRequest object.
 
 getSkin ()
 Get the Skin object.
 
 getStats ()
 Get the Stats object.
 
 getTiming ()
 Get the Timing object.
 
 getTitle ()
 Get the Title object.
 
 getUser ()
 Get the User object.
 
 getWikiPage ()
 Get the WikiPage object.
 
 msg ()
 Get a Message object with context set Parameters are the same as wfMessage()
 
 setContext (IContextSource $context)
 Set the IContextSource object.
 

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.

Reimplemented in DerivativeContext.

Definition at line 99 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 199 of file ContextSource.php.

References getContext().

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

◆ getConfig()

ContextSource::getConfig ( )

Get the Config object.

Since
1.23
Returns
Config

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 67 of file ContextSource.php.

References getContext().

Referenced by ApiMain\__construct(), HTMLForm\__construct(), ImageGalleryBase\__construct(), ApiQuery\__construct(), ApiQueryQueryPage\__construct(), ImageListPager\__construct(), ActiveUsersPager\__construct(), OutputPage\adaptCdnTTL(), OutputPage\addFeedLink(), OutputPage\addParserOutputMetadata(), OutputPage\addScriptFile(), Skin\addToSidebarPlain(), UploadForm\addUploadJS(), ApiQuerySiteinfo\appendDbReplLagInfo(), ApiQuerySiteinfo\appendExtensions(), ApiQuerySiteinfo\appendFileExtensions(), ApiQuerySiteinfo\appendGeneralInfo(), ApiQuerySiteinfo\appendInterwikiMap(), 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(), ApiFormatBase\closePrinter(), ApiBase\dieUsageMsgOrDebug(), OutputPage\disallowUserJs(), ApiMain\errorMessageFromException(), ApiEditPage\execute(), ApiEmailUser\execute(), ApiFeedContributions\execute(), ApiFeedRecentChanges\execute(), ApiFeedWatchlist\execute(), ApiFormatPhp\execute(), ApiLogin\execute(), ApiOpenSearch\execute(), ApiProtect\execute(), ApiPurge\execute(), ApiQueryAllMessages\execute(), ApiQueryAllUsers\execute(), ApiQueryAuthManagerInfo\execute(), ApiQueryBlocks\execute(), ApiQueryFileRepoInfo\execute(), ApiQueryLogEvents\execute(), ApiQueryUsers\execute(), ApiRemoveAuthenticationData\execute(), ApiResetPassword\execute(), ApiUndelete\execute(), ApiUpload\execute(), ApiQueryRevisionsBase\extractRevisionInfo(), OldChangesList\formatChangeLine(), HistoryPager\formatRow(), UsersPager\formatRow(), HTMLForm\getAction(), ApiImport\getAllowedImportSources(), ApiQueryLogEvents\getAllowedLogActions(), ApiFeedWatchlist\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryAllDeletedRevisions\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryAllRevisions\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryContributions\getAllowedParams(), ApiResetPassword\getAllowedParams(), HTMLForm\getButtons(), ApiQuerySiteinfo\getCacheMode(), OutputPage\getCacheVaryCookies(), ApiUpload\getChunkResult(), ApiQueryUserInfo\getCurrentUserInfo(), ReverseChronologicalPager\getDateCond(), ApiLogin\getDescriptionMessage(), UploadForm\getDescriptionSection(), HistoryPager\getEndBody(), ApiResetPassword\getExamplesMessages(), UploadForm\getExtensionsMessage(), ImageListPager\getFieldNames(), ApiCSPReport\getFlags(), OutputPage\getFrameOptions(), OutputPage\getHeadLinksArray(), HTMLForm\getHiddenFields(), CategoryViewer\getHTML(), HTMLButtonField\getInputHTML(), EnhancedChangesList\getLineData(), ApiBase\getModuleSourceInfo(), ApiPageSet\getPageTableFields(), ActiveUsersPager\getQueryInfo(), NewFilesPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), OutputPage\getResourceLoader(), UploadForm\getSourceSection(), ApiQueryInfo\getVisitingWatcherInfo(), ApiQueryInfo\getWatcherInfo(), ApiMain\handleCORS(), ApiResetPassword\hasAnyRoutes(), OutputPage\headElement(), ApiFormatBase\initPrinter(), ApiLogin\isDeprecated(), ImageListPager\isFieldSortable(), OutputPage\isUserCssPreview(), OutputPage\isUserJsPreview(), ApiQueryImageInfo\mergeThumbParams(), ApiMain\modifyHelp(), RawAction\onView(), OutputPage\output(), ApiMain\printResult(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), ChangesList\recentChangesFlags(), ApiQueryInfo\requestExtraData(), ApiBase\requirePostedParameters(), ApiQueryAllImages\run(), ApiQueryCategoryMembers\run(), ApiQueryExtLinksUsage\run(), ApiQueryQueryPage\run(), ApiQuerySearch\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryAllRevisions\run(), ApiQueryBacklinksprop\run(), OutputPage\sendCacheControl(), ApiMain\sendCacheHeaders(), HTMLForm\setDisplayFormat(), OutputPage\setFeedAppendQuery(), ApiMain\setRequestExpectations(), ApiMain\setupExecuteAction(), SkinTemplate\setupTemplate(), OutputPage\showLagWarning(), 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, RequestContext\getMain(), and wfDebug().

Referenced by ApiMain\__construct(), RevisionItem\__construct(), ApiBase\__construct(), OutputPage\addSubtitle(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), canUseWikiPage(), DerivativeContext\canUseWikiPage(), ApiParse\categoriesHtml(), CategoryViewer\clearCategoryState(), ApiBlock\execute(), ApiComparePages\execute(), ApiEmailUser\execute(), ApiExpandTemplates\execute(), ApiFeedContributions\execute(), ApiHelp\execute(), ApiLogin\execute(), ApiOptions\execute(), ApiParse\execute(), ApiQueryUsers\execute(), ApiRevisionDelete\execute(), ApiUnblock\execute(), ApiUserrights\execute(), ApiMain\executeAction(), ApiMain\executeActionWithErrorHandling(), exportSession(), ApiFeedContributions\feedItem(), ChangesList\formatCharacterDifference(), ContribsPager\formatRow(), ProtectedPagesPager\formatValue(), ApiUpload\getChunkResult(), getConfig(), DerivativeContext\getConfig(), FormatMetadata\getExtendedMetadataFromHook(), ApiAMCreateAccount\getFinalDescription(), ApiBase\getFinalDescription(), ApiClientLogin\getFinalDescription(), ApiLinkAccount\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(), getStats(), getTiming(), DerivativeContext\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(), ChangesList\recentChangesFlags(), OutputPage\setHTMLTitle(), OutputPage\setPageTitle(), OutputPage\setTitle(), SideBarTest\setUp(), SpecialComparePages\showDiff(), DifferenceEngine\showDiffPage(), SkinTemplate\tabAction(), ApiDocumentationTest\testDocumentationExists(), and SpecialEmailUser\uiSubmit().

◆ getLanguage()

ContextSource::getLanguage ( )

Get the Language object.

Since
1.19
Returns
Language

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 142 of file ContextSource.php.

References getContext().

Referenced by ApiMain\__construct(), AllMessagesTablePager\__construct(), DifferenceEngine\addHeader(), OutputPage\addInlineStyle(), OutputPage\buildExemptModules(), SpecialPageFactory\capturePath(), OutputPage\enableOOUI(), ApiHelp\execute(), ApiParamInfo\execute(), ApiQueryAllMessages\execute(), FormatMetadata\fetchExtendedMetadata(), OldChangesList\formatChangeLine(), SkinTemplate\formatLanguageName(), FormatMetadata\formatNum(), CategoryPager\formatRow(), ActiveUsersPager\formatRow(), ContribsPager\formatRow(), NewFilesPager\formatRow(), UsersPager\formatRow(), AllMessagesTablePager\formatValue(), ProtectedPagesPager\formatValue(), BlockListPager\formatValue(), ChangesList\getArticleLink(), UploadForm\getExtensionsMessage(), LogEventsList\getFilterLinks(), CategoryViewer\getHTML(), Skin\getHtmlElementAttributes(), SkinTemplate\getLanguages(), EditWatchlistNormalHTMLForm\getLegend(), IndexPager\getLimitLinks(), TablePager\getLimitSelectList(), AlphabeticPager\getNavigationBar(), ReverseChronologicalPager\getNavigationBar(), FormatMetadata\getPriorityLanguages(), ImageGalleryBase\getRenderLang(), DifferenceEngine\getRevisionHeader(), OutputPage\getRlClientContext(), AllMessagesTablePager\getRowAttrs(), UploadForm\getSourceSection(), ImageHistoryList\getThumbForLine(), ChangesList\getTimestamp(), OutputPage\headElement(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ChangesList\insertDateHeader(), ChangesList\insertLogEntry(), ChangesList\insertUserRelatedLinks(), Skin\lastModified(), LogEventsList\logLine(), FormatMetadata\makeFormattedData(), ApiMain\modifyHelp(), SkinTemplate\prepareQuickTemplate(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesLine(), HistoryPager\revLink(), UploadFromUrlTestSuite\setUp(), OutputPage\showLagWarning(), DifferenceEngine\showMissingRevision(), OutputPage\styleLink(), and Skin\subPageSubtitle().

◆ getOutput()

ContextSource::getOutput ( )

Get the OutputPage object.

Since
1.18
Returns
OutputPage

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 122 of file ContextSource.php.

References getContext().

Referenced by OOUIHTMLForm\__construct(), CategoryViewer\__construct(), UploadForm\__construct(), UploadForm\addUploadJS(), ChangesList\beginRecentChangesList(), EnhancedChangesList\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(), HTMLForm\getHTML(), VFormHTMLForm\getHTML(), CategoryViewer\getHTML(), SkinTemplate\getLanguages(), DifferenceEngine\getMarkPatrolledLinkInfo(), Skin\getNewtalks(), DerivativeContext\getOutput(), UsersPager\getPageHeader(), Skin\getRevisionId(), HistoryPager\getStartBody(), ApiMain\handleCORS(), Skin\lastModified(), ImportReporter\open(), SkinTemplate\outputPage(), ImageListPager\outputUserDoesNotExist(), MediaWiki\performRequest(), SkinTemplate\prepareQuickTemplate(), Preferences\profilePreferences(), DifferenceEngine\renderNewRevision(), ImportReporter\reportNotice(), ImportReporter\reportPage(), ApiMain\sendCacheHeaders(), DifferenceEngine\showDiff(), DifferenceEngine\showDiffPage(), DifferenceEngine\showDiffStyle(), DifferenceEngine\showMissingRevision(), LogEventsList\showOptions(), LoginHelper\showReturnToPage(), Skin\subPageSubtitle(), and TraditionalImageGallery\toHTML().

◆ getRequest()

ContextSource::getRequest ( )

Get the WebRequest object.

Since
1.18
Returns
WebRequest

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 77 of file ContextSource.php.

References getContext().

Referenced by ApiMain\__construct(), AllMessagesTablePager\__construct(), ApiContinuationManager\__construct(), ImageListPager\__construct(), IndexPager\__construct(), TablePager\__construct(), UsersPager\__construct(), OutputPage\addAcceptLanguage(), SkinTemplate\buildContentNavigationUrls(), OutputPage\buildExemptModules(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), OutputPage\checkLastModified(), ApiMain\checkMaxLag(), CategoryViewer\clearCategoryState(), CategoryPage\closeShowCategory(), ApiMain\createErrorPrinter(), Article\delete(), ApiCSPReport\error(), ApiCheckToken\execute(), ApiClearHasMsg\execute(), ApiCSPReport\execute(), ApiEditPage\execute(), ApiFeedRecentChanges\execute(), ApiLogin\execute(), ApiPurge\execute(), ApiQueryDeletedrevs\execute(), ApiQueryTokens\execute(), ApiUpload\execute(), ApiMain\executeActionWithErrorHandling(), Action\getActionName(), OutputPage\getBottomScripts(), HTMLForm\getButtons(), OOUIHTMLForm\getButtons(), ApiUpload\getChunkResult(), ApiQueryUserInfo\getCurrentUserInfo(), MWDebug\getDebugInfo(), LogEventsList\getDefaultQuery(), IndexPager\getDefaultQuery(), LogEventsList\getExtraInputs(), LogPager\getFilterParams(), MediaWiki\Session\SessionManager\getGlobalSession(), OutputPage\getHeadLinksArray(), TablePager\getHiddenFields(), ResourceLoaderStartUpModule\getModuleRegistrations(), Article\getOldIDFromRequest(), ApiBase\getParameterFromSettings(), ApiCSPReport\getReport(), OutputPage\getRlClientContext(), UploadForm\getSourceSection(), NewFilesPager\getStartBody(), ApiTokens\getTokenTypes(), Skin\getUndeleteLink(), ApiMain\getUpload(), ApiMain\getUserAgent(), ApiMain\getVal(), ApiMain\handleCORS(), ApiMain\handleException(), EditPage\handleStatus(), OutputPage\haveCacheVaryCookies(), MediaWiki\initializeArticle(), ApiQuery\instantiateModules(), HTMLButtonField\isBadIE(), ApiMain\lacksSameOriginSecurity(), HTMLForm\loadData(), ProtectionForm\loadData(), Profiler\logData(), ApiBase\logFeatureUsage(), ApiMain\logRequest(), MediaWiki\main(), ImagePage\openShowImage(), OutputPage\output(), MediaWiki\parseTitle(), MediaWiki\performAction(), MediaWiki\performRequest(), MediaWiki\preOutputCommit(), HTMLForm\prepareForm(), SkinTemplate\prepareQuickTemplate(), ApiMain\reportUnusedParams(), ApiBase\requirePostedParameters(), OutputPage\returnToMain(), ApiQueryRandom\run(), ApiQueryRecentChanges\run(), ProtectionForm\save(), ApiUpload\selectUploadModule(), OutputPage\sendCacheControl(), ApiMain\sendCacheHeaders(), User\setCookies(), SpecialPageExecutor\setEditTokenFromUser(), AuthManagerSpecialPage\setRequest(), ApiMain\setRequestExpectations(), ApiMain\setupExternalResponse(), SkinTemplate\setupTemplateForOutput(), DifferenceEngine\showDiffPage(), Article\showDiffPage(), OutputPage\showPermissionsErrorPage(), Article\showRedirectedFromHeader(), MediaWiki\Session\SessionTest\testConstructor(), MediaWiki\Session\SessionBackendTest\testResetIdOfGlobalSession(), MediaWiki\Session\SessionBackendTest\testTakeOverGlobalSession(), MediaWiki\Session\SessionBackendTest\testUnpersistOfGlobalSession(), HTMLForm\tryAuthorizedSubmit(), MediaWiki\tryNormaliseRedirect(), OutputPage\userCanPreview(), ApiBase\useTransactionalTimeLimit(), ApiBase\validateToken(), ApiCSPReport\verifyPostBodyOk(), CategoryPage\view(), ImagePage\view(), and wfLogProfilingData().

◆ getSkin()

ContextSource::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 174 of file ContextSource.php.

References getContext().

Referenced by ApiMain\executeActionWithErrorHandling(), and DifferenceEngine\generateTextDiffBody().

◆ getTiming()

ContextSource::getTiming ( )

Get the Timing object.

Since
1.27
Returns
Timing

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 162 of file ContextSource.php.

References getContext().

◆ getTitle()

ContextSource::getTitle ( )

Get the Title object.

Since
1.18
Returns
Title|null

Implements IContextSource.

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

Definition at line 87 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(), HistoryPager\curLink(), ApiEditPage\execute(), FileDuplicateSearchPage\formatResult(), HistoryPager\formatRow(), OutputPage\getBottomScripts(), 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(), CategoryPager\getStartForm(), Skin\getUndeleteLink(), OutputPage\headElement(), HistoryPager\historyLine(), Skin\isRevisionCurrent(), OutputPage\isUserCssPreview(), OutputPage\isUserJsPreview(), HistoryPager\lastLink(), Skin\lastModified(), DifferenceEngine\loadRevisionData(), DifferenceEngine\loadRevisionIds(), IndexPager\makeLink(), DifferenceEngine\mapDiffPrevNext(), OutputPage\parse(), SkinTemplate\prepareQuickTemplate(), Skin\printSource(), DifferenceEngine\renderNewRevision(), HistoryPager\revLink(), OutputPage\setFeedAppendQuery(), SkinTemplate\setupTemplateForOutput(), DifferenceEngine\showDiffPage(), and OutputPage\userCanPreview().

◆ getUser()

ContextSource::getUser ( )

Get the User object.

Since
1.18
Returns
User

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 132 of file ContextSource.php.

References getContext().

Referenced by LogEventsList\__construct(), HistoryPager\__construct(), UploadForm\__construct(), IndexPager\__construct(), ImageHistoryList\beginImageHistoryList(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiMain\canApiHighLimits(), ApiMain\checkAsserts(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), OutputPage\checkLastModified(), DifferenceEngine\deletedLink(), ApiQuery\doExport(), ApiAMCreateAccount\execute(), ApiBlock\execute(), ApiChangeAuthenticationData\execute(), ApiCheckToken\execute(), ApiClearHasMsg\execute(), ApiCSPReport\execute(), ApiDelete\execute(), ApiEditPage\execute(), ApiEmailUser\execute(), ApiFileRevert\execute(), ApiImageRotate\execute(), ApiImport\execute(), ApiLinkAccount\execute(), ApiLogout\execute(), ApiManageTags\execute(), ApiMove\execute(), ApiOptions\execute(), ApiParse\execute(), ApiPatrol\execute(), ApiProtect\execute(), ApiPurge\execute(), ApiQueryAuthManagerInfo\execute(), ApiQueryBlocks\execute(), ApiQueryDeletedrevs\execute(), ApiQueryFilearchive\execute(), ApiQueryImageInfo\execute(), ApiQueryLogEvents\execute(), ApiQueryMyStashedFiles\execute(), ApiQueryStashImageInfo\execute(), ApiQueryTokens\execute(), ApiRemoveAuthenticationData\execute(), ApiResetPassword\execute(), ApiRevisionDelete\execute(), ApiRollback\execute(), ApiSetNotificationTimestamp\execute(), ApiStashEdit\execute(), ApiTag\execute(), ApiUnblock\execute(), ApiUndelete\execute(), ApiUpload\execute(), ApiUserrights\execute(), ApiWatch\execute(), ApiQueryWatchlist\extractOutputData(), ApiQueryInfo\extractPageInfo(), ApiQueryRevisionsBase\extractRevisionInfo(), ApiQueryLogEvents\extractRowInfo(), ApiQueryRecentChanges\extractRowInfo(), HistoryPager\formatRow(), ContribsPager\formatRow(), UsersPager\formatRow(), ProtectedPagesPager\formatValue(), BlockListPager\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(), EnhancedChangesList\getLogText(), DifferenceEngine\getMarkPatrolledLinkInfo(), PreferencesForm\getModifiedUser(), Skin\getNewtalks(), UploadForm\getOptionsSection(), ActiveUsersPager\getQueryInfo(), BlockListPager\getQueryInfo(), ContribsPager\getQueryInfo(), DeletedContribsPager\getQueryInfo(), UsersPager\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(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ApiPageSet\initFromRevIDs(), ChangesList\insertDateHeader(), ChangesList\insertDiffHist(), ChangesList\insertRollback(), Skin\lastModified(), LogPager\limitPerformer(), LogPager\limitTitle(), LogPager\limitType(), DifferenceEngine\loadNewText(), DifferenceEngine\loadText(), ApiBase\logFeatureUsage(), ApiMain\logRequest(), ApiMergeHistory\merge(), ApiMove\movePage(), ApiPurge\mustBePosted(), RollbackAction\onView(), OutputPage\parserOptions(), ApiUpload\performStash(), ApiUpload\performUpload(), Skin\preloadExistence(), ApiQueryContributions\prepareQuery(), SpecialBlock\processForm(), ApiTag\processIndividual(), ImportReporter\reportPage(), DifferenceEngine\revisionDeleteLink(), ApiQueryRecentChanges\run(), ApiQueryWatchlist\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryAllRevisions\run(), ApiQueryDeletedRevisions\run(), ApiQueryRevisions\run(), ApiUpload\selectUploadModule(), SkinTemplate\setupTemplateForOutput(), 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.

Reimplemented in DerivativeContext.

Definition at line 112 of file ContextSource.php.

References getContext().

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

◆ 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 186 of file ContextSource.php.

References $args, and getContext().

Referenced by AllMessagesTablePager\__construct(), UploadForm\__construct(), DeletedContribsPager\__construct(), ContribsPager\__construct(), OutputPage\addHelpLink(), OutputPage\addReturnTo(), Skin\addToSidebarPlain(), OutputPage\addWikiMsgArray(), ApiQuerySiteinfo\appendSkins(), ImageHistoryList\beginImageHistoryList(), SkinTemplate\buildContentNavigationUrls(), AllMessagesTablePager\buildForm(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ListToggle\checkboxLink(), ApiUpload\checkVerification(), ImportReporter\close(), FormatMetadata\collapseContactInfo(), ApiQueryTags\execute(), ApiRollback\execute(), FormatMetadata\exifMsg(), Skin\footerLink(), FormatMetadata\formatCoords(), OutputPage\formatPermissionsErrorMessage(), CategoryPager\formatRow(), ActiveUsersPager\formatRow(), ContribsPager\formatRow(), UsersPager\formatRow(), AllMessagesTablePager\formatValue(), ProtectedPagesPager\formatValue(), BlockListPager\formatValue(), HTMLForm\getButtons(), OOUIHTMLForm\getButtons(), VFormHTMLForm\getButtons(), PreferencesForm\getButtons(), Skin\getCachedNotice(), Skin\getCategoryLinks(), Skin\getCopyright(), CategoryViewer\getCountMessage(), DifferenceEngine\getDiff(), EnhancedChangesList\getDiffHistLinks(), TablePager\getEmptyBody(), ApiBase\getExamplesMessages(), UploadForm\getExtensionsMessage(), LogEventsList\getExtraInputs(), ApiFeedRecentChanges\getFeedObject(), AllMessagesTablePager\getFieldNames(), BlockListPager\getFieldNames(), ImageListPager\getFieldNames(), ProtectedPagesPager\getFieldNames(), LogEventsList\getFilterLinks(), ApiBase\getFinalDescription(), ApiBase\getFinalParamDescription(), OutputPage\getHeadLinksArray(), CategoryViewer\getHTML(), ListToggle\getHTML(), CategoryViewer\getImageSection(), Linker\getInvalidTitleDescription(), HTMLForm\getLegend(), EditWatchlistNormalHTMLForm\getLegend(), TablePager\getLimitDropdown(), EnhancedChangesList\getLineData(), EnhancedChangesList\getLogText(), AlphabeticPager\getNavigationBar(), ReverseChronologicalPager\getNavigationBar(), TablePager\getNavigationBar(), Skin\getNewtalks(), UsersPager\getPageHeader(), CategoryViewer\getPagesSection(), EditPage\getPreviewText(), HistoryPager\getRevisionButton(), DifferenceEngine\getRevisionHeader(), UploadForm\getSourceSection(), HistoryPager\getStartBody(), AllMessagesTablePager\getStartBody(), CategoryPager\getStartForm(), CategoryViewer\getSubcategorySection(), HTMLForm\getSubmitText(), ImageHistoryList\getThumbForLine(), LogEventsList\getTitleInput(), LogEventsList\getTitlePattern(), Skin\getUndeleteLink(), LogEventsList\getUserInput(), 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(), 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(), TraditionalImageGallery\toHTML(), OutputPage\versionRequired(), ApiWatch\watchTitle(), and OutputPage\wrapWikiMsg().

◆ setContext()

Member Data Documentation

◆ $context


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