MediaWiki  1.34.0
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,... $params)
 Get a Message object with context set Parameters are the same as wfMessage() More...
 
 setContext (IContextSource $context)
 

Private Attributes

IContextSource $context
 

Detailed Description

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

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

References getContext().

Referenced by SkinTemplate\buildContentNavigationUrls().

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

References getContext().

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

◆ getConfig()

ContextSource::getConfig ( )
Since
1.23
Returns
Config

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 63 of file ContextSource.php.

References getContext().

Referenced by ApiQueryQueryPage\__construct(), ImageListPager\__construct(), ActiveUsersPager\__construct(), ApiQuery\__construct(), ImageGalleryBase\__construct(), ApiMain\__construct(), HTMLForm\__construct(), ApiMain\addRequestedFields(), Skin\addToSidebarPlain(), UploadForm\addUploadJS(), SkinTemplate\buildNavUrls(), Skin\buildSidebar(), ApiMain\checkBotReadOnly(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkMaxLag(), ApiUpload\checkVerification(), DifferenceEngine\debug(), ApiBase\dieWithErrorOrDebug(), ApiMain\errorMessagesFromException(), ApiProtect\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiUpload\execute(), ApiChangeAuthenticationData\execute(), ApiFormatPhp\execute(), ApiEditPage\execute(), ApiQueryAllMessages\execute(), ApiQueryAuthManagerInfo\execute(), ApiQueryBlocks\execute(), ApiRollback\execute(), ApiBlock\execute(), ApiQueryFileRepoInfo\execute(), ApiQueryLogEvents\execute(), ApiFeedRecentChanges\execute(), ApiRemoveAuthenticationData\execute(), ApiSetPageLanguage\execute(), ApiQueryAllUsers\execute(), ApiFeedContributions\execute(), ApiFeedWatchlist\execute(), ApiLogin\execute(), ApiOpenSearch\execute(), ApiQueryUsers\execute(), ApiQueryRevisionsBase\extractDeprecatedContent(), OldChangesList\formatChangeLine(), HistoryPager\formatRow(), UsersPager\formatRow(), BlockListPager\formatValue(), HTMLForm\getAction(), ApiImport\getAllowedImportSources(), ApiQueryLogEvents\getAllowedLogActions(), ApiResetPassword\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiBlock\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryPageImages\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllRevisions\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryAllDeletedRevisions\getAllowedParams(), ApiQueryUserContribs\getAllowedParams(), HTMLForm\getButtons(), Skin\getCachedNotice(), Skin\getCategoryLinks(), ApiUpload\getChunkResult(), Skin\getCopyright(), Skin\getCopyrightIcon(), ApiQueryUserInfo\getCurrentUserInfo(), UploadForm\getDescriptionSection(), HistoryPager\getEndBody(), ApiResetPassword\getExamplesMessages(), ApiSetPageLanguage\getExtendedDescription(), ApiLogin\getExtendedDescription(), UploadForm\getExtensionsMessage(), ImageListPager\getFieldNames(), ApiCSPReport\getFlags(), HTMLForm\getHiddenFields(), CategoryViewer\getHTML(), HTMLButtonField\getInputHTML(), EnhancedChangesList\getLineData(), Skin\getLogo(), DifferenceEngine\getMarkPatrolledLinkInfo(), ApiMain\getMaxLag(), ApiBase\getModuleSourceInfo(), ApiPageSet\getPageTableFields(), Skin\getPoweredBy(), NewFilesPager\getQueryInfo(), ActiveUsersPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), Skin\getSkinStylePath(), UploadForm\getSourceSection(), ApiQueryInfo\getVisitingWatcherInfo(), ApiQueryInfo\getWatcherInfo(), ApiMain\handleCORS(), ApiResetPassword\hasAnyRoutes(), ApiFormatBase\initPrinter(), ApiLogin\isDeprecated(), ImageListPager\isFieldSortable(), ApiMain\logRequest(), Skin\makeFooterIcon(), ApiQueryImageInfo\mergeThumbParams(), ApiMain\printResult(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), ChangesList\recentChangesFlags(), ApiQueryInfo\requestExtraData(), ApiBase\requirePostedParameters(), ApiQueryAllRevisions\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryExtLinksUsage\run(), ApiQuerySearch\run(), ApiQueryCategoryMembers\run(), ApiQueryAllPages\run(), ApiQueryAllImages\run(), ApiQueryQueryPage\run(), ApiQueryBacklinksprop\run(), ApiMain\sendCacheHeaders(), HTMLForm\setDisplayFormat(), ApiMain\setRequestExpectations(), SkinTemplate\setupTemplate(), LogEventsList\showOptions(), LoginHelper\showReturnToPage(), 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 RevisionItem\__construct(), ApiMain\__construct(), ApiBase\__construct(), SkinTemplate\buildContentNavigationUrls(), UsersPager\buildGroupLink(), SkinTemplate\buildNavUrls(), canUseWikiPage(), DerivativeContext\canUseWikiPage(), CategoryViewer\clearCategoryState(), ApiEmailUser\execute(), ApiHelp\execute(), ApiRevisionDelete\execute(), ApiExpandTemplates\execute(), ApiOptions\execute(), ApiUnblock\execute(), ApiBlock\execute(), ApiParse\execute(), ApiComparePages\execute(), ApiFeedContributions\execute(), ApiUserrights\execute(), ApiQueryUsers\execute(), ApiMain\executeAction(), ApiMain\executeActionWithErrorHandling(), exportSession(), ApiQueryRevisionsBase\extractDeprecatedContent(), ApiFeedContributions\feedItem(), ChangesList\formatCharacterDifference(), ProtectedPagesPager\formatValue(), DifferenceEngine\generateContentDiffBody(), DifferenceEngine\generateTextDiffBody(), ApiUpload\getChunkResult(), getConfig(), DerivativeContext\getConfig(), ApiComparePages\getDiffRevision(), FormatMetadata\getExtendedMetadataFromHook(), ApiLinkAccount\getFinalDescription(), ApiAMCreateAccount\getFinalDescription(), ApiClientLogin\getFinalDescription(), ApiBase\getFinalDescription(), ApiBase\getFinalParamDescription(), ApiBase\getFinalSummary(), getLanguage(), DerivativeContext\getLanguage(), EditWatchlistNormalHTMLForm\getLegend(), getOutput(), DerivativeContext\getOutput(), UsersPager\getPageHeader(), DifferenceEngine\getParserOutput(), ApiOptions\getPreferences(), getRequest(), DerivativeContext\getRequest(), getSkin(), DerivativeContext\getSkin(), DifferenceEngine\getSlotDiffRenderers(), UploadForm\getSourceSection(), NewFilesPager\getStartBody(), CategoryPager\getStartForm(), DerivativeContext\getTiming(), getTiming(), getTitle(), DerivativeContext\getTitle(), HTMLForm\getTitle(), Skin\getUndeleteLink(), ApiUserrights\getUrUser(), getUser(), DerivativeContext\getUser(), getWikiPage(), DerivativeContext\getWikiPage(), HistoryPager\historyLine(), ChangesList\insertLog(), ChangesList\insertLogEntry(), ChangesList\insertRollback(), LogEventsList\logLine(), ApiParse\makeParserOptions(), msg(), ApiUpload\performUpload(), SkinTemplate\prepareQuickTemplate(), SpecialTags\processCreateTagForm(), SpecialTags\processTagForm(), SpecialUnblock\processUIUnblock(), ChangesList\recentChangesFlags(), ApiOptions\resetPreferences(), MediaWiki\Preferences\DefaultPreferencesFactory\saveFormData(), SpecialComparePages\showDiff(), DifferenceEngine\showDiffPage(), LogEventsList\showOptions(), MediaWiki\Preferences\DefaultPreferencesFactory\submitForm(), SkinTemplate\tabAction(), and DifferenceEngine\textDiff().

◆ getLanguage()

ContextSource::getLanguage ( )
Since
1.19
Returns
Language

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 128 of file ContextSource.php.

References getContext().

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

◆ getOutput()

ContextSource::getOutput ( )
Since
1.18
Returns
OutputPage

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 112 of file ContextSource.php.

References getContext().

Referenced by OOUIHTMLForm\__construct(), UploadForm\__construct(), CategoryViewer\__construct(), UploadForm\addUploadJS(), MediaWiki\Extension\OATHAuth\Special\DisableOATHForUser\alterForm(), EnhancedChangesList\beginRecentChangesList(), ChangesList\beginRecentChangesList(), Skin\bottomScripts(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), ApiMain\checkConditionalRequestHeaders(), ImportReporter\close(), HTMLForm\displayForm(), Skin\editUrlOptions(), SkinVector\enableResponsiveMode(), TablePager\getBody(), Skin\getCachedNotice(), Skin\getCategories(), Skin\getCategoryLinks(), CategoryTreeCategoryViewer\getCategoryTree(), Skin\getCopyright(), Skin\getDefaultModules(), HTMLForm\getErrorsOrWarnings(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPEnableForm\getHTML(), VFormHTMLForm\getHTML(), CategoryViewer\getHTML(), HTMLForm\getHTML(), CategoryViewer\getImageSection(), SkinTemplate\getLanguages(), DifferenceEngine\getMarkPatrolledLinkInfo(), TablePager\getNavigationBar(), Skin\getNewtalks(), CategoryViewer\getPagesSection(), Skin\getRevisionId(), HistoryPager\getStartBody(), ApiMain\handleCORS(), Skin\isRevisionCurrent(), Skin\lastModified(), CategoryTreeHooks\onSkinBuildSidebar(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPDisableForm\onSuccess(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPEnableForm\onSuccess(), ImportReporter\open(), SkinTemplate\outputPage(), ImageListPager\outputUserDoesNotExist(), SkinTemplate\prepareQuickTemplate(), Skin\printSource(), DifferenceEngine\renderNewRevision(), ImportReporter\reportNotice(), ImportReporter\reportPage(), ApiMain\sendCacheHeaders(), DifferenceEngine\showDiff(), DifferenceEngine\showDiffPage(), DifferenceEngine\showDiffStyle(), DifferenceEngine\showMissingRevision(), LoginHelper\showReturnToPage(), Skin\subPageSubtitle(), and TraditionalImageGallery\toHTML().

◆ getRequest()

ContextSource::getRequest ( )
Since
1.18
Returns
WebRequest

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 71 of file ContextSource.php.

References getContext().

Referenced by TablePager\__construct(), ApiContinuationManager\__construct(), ImageListPager\__construct(), UsersPager\__construct(), IndexPager\__construct(), ApiMain\__construct(), CategoryTreeCategoryViewer\addSubcategoryObject(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), ApiMain\checkMaxLag(), CategoryViewer\clearCategoryState(), ApiFormatBase\closePrinter(), ApiMain\createErrorPrinter(), ApiCSPReport\error(), ApiCheckToken\execute(), ApiQueryTokens\execute(), ApiEditPage\execute(), ApiQueryDeletedrevs\execute(), ApiCSPReport\execute(), ApiFeedRecentChanges\execute(), ApiLogin\execute(), ApiMain\executeActionWithErrorHandling(), OOUIHTMLForm\getButtons(), HTMLForm\getButtons(), ApiQueryUserInfo\getCurrentUserInfo(), IndexPager\getDefaultQuery(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPEnableForm\getDescriptors(), LogPager\getFilterParams(), TablePager\getHiddenFields(), ApiCSPReport\getReport(), UploadForm\getSourceSection(), NewFilesPager\getStartBody(), ApiTokens\getTokenTypes(), Skin\getUndeleteLink(), ApiMain\getUpload(), ApiMain\getUserAgent(), ApiMain\getVal(), ApiMain\handleCORS(), ApiMain\handleException(), ApiQuery\instantiateModules(), ApiMain\lacksSameOriginSecurity(), HTMLForm\loadData(), ApiBase\logFeatureUsage(), ApiMain\logRequest(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPDisableForm\onSubmit(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPEnableForm\onSubmit(), HTMLForm\prepareForm(), SkinTemplate\prepareQuickTemplate(), ApiMain\reportUnusedParams(), ApiBase\requirePostedParameters(), ApiQueryRecentChanges\run(), ApiMain\sendCacheHeaders(), ApiMain\setRequestExpectations(), ApiMain\setupExternalResponse(), SkinTemplate\setupTemplateForOutput(), DifferenceEngine\showDiffPage(), HTMLForm\tryAuthorizedSubmit(), ApiBase\useTransactionalTimeLimit(), ApiBase\validateToken(), and ApiCSPReport\verifyPostBodyOk().

◆ getSkin()

ContextSource::getSkin ( )
Since
1.18
Returns
Skin

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 136 of file ContextSource.php.

References getContext().

◆ getStats()

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

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 154 of file ContextSource.php.

◆ getTiming()

ContextSource::getTiming ( )
Since
1.27
Returns
Timing

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 144 of file ContextSource.php.

References getContext().

◆ getTitle()

◆ getUser()

ContextSource::getUser ( )
Since
1.18
Returns
User

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 120 of file ContextSource.php.

References getContext().

Referenced by UploadForm\__construct(), HistoryPager\__construct(), LogEventsList\__construct(), IndexPager\__construct(), ApiBase\addBlockInfoToStatus(), ImageHistoryList\beginImageHistoryList(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiMain\canApiHighLimits(), ApiMain\checkAsserts(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), ApiMain\checkReadOnly(), ApiQueryRevisionsBase\checkRevDel(), ApiBase\checkTitleUserPermissions(), ApiBase\checkUserRightsAny(), HistoryPager\curLink(), ApiQuery\doExport(), LogPager\enforceActionRestrictions(), LogPager\enforcePerformerRestrictions(), ApiBase\errorArrayToStatus(), ApiValidatePassword\execute(), ApiScribuntoConsole\execute(), ApiProtect\execute(), ApiManageTags\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiImageRotate\execute(), ApiClearHasMsg\execute(), ApiImport\execute(), ApiCheckToken\execute(), ApiMove\execute(), ApiWatch\execute(), ApiUpload\execute(), ApiLogout\execute(), ApiPurge\execute(), ApiQueryStashImageInfo\execute(), ApiQueryTokens\execute(), ApiRevisionDelete\execute(), ApiQueryMyStashedFiles\execute(), ApiTag\execute(), ApiEditPage\execute(), ApiFileRevert\execute(), ApiSetNotificationTimestamp\execute(), ApiChangeAuthenticationData\execute(), ApiQueryTitleBlacklist\execute(), MediaWiki\Extension\OATHAuth\Api\Module\ApiOATHValidate\execute(), ApiPatrol\execute(), ApiQueryAuthManagerInfo\execute(), ApiQueryBlocks\execute(), ApiDelete\execute(), ApiRollback\execute(), ApiUnblock\execute(), ApiQueryDeletedrevs\execute(), ApiQueryFilearchive\execute(), ApiBlock\execute(), ApiCSPReport\execute(), MediaWiki\Extension\OATHAuth\Api\Module\ApiQueryOATH\execute(), ApiParse\execute(), ApiQueryImageInfo\execute(), ApiQueryLogEvents\execute(), ApiStashEdit\execute(), ApiRemoveAuthenticationData\execute(), ApiSetPageLanguage\execute(), ApiUserrights\execute(), ApiLinkAccount\execute(), ApiAMCreateAccount\execute(), ApiResetPassword\execute(), ApiQueryRevisionsBase\extractDeprecatedContent(), ApiQueryWatchlist\extractOutputData(), ApiQueryInfo\extractPageInfo(), ApiQueryLogEvents\extractRowInfo(), ApiQueryRecentChanges\extractRowInfo(), ApiFeedContributions\feedItem(), HistoryPager\formatRow(), UsersPager\formatRow(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), ApiQueryLogEvents\getCacheMode(), Skin\getCategories(), Skin\getCategoryLinks(), ApiUpload\getChunkResult(), ApiUpload\getContextResult(), ApiQueryUserInfo\getCurrentUserInfo(), Skin\getDefaultModules(), UploadForm\getDescriptionSection(), ApiComparePages\getDiffRevision(), HistoryPager\getEndBody(), HTMLForm\getHiddenFields(), ApiQueryUserInfo\getLatestContributionTime(), EnhancedChangesList\getLineData(), DifferenceEngine\getMarkPatrolledLinkInfo(), PreferencesFormOOUI\getModifiedUser(), Skin\getNewtalks(), UploadForm\getOptionsSection(), Skin\getPageClasses(), ApiParse\getParsedContent(), NewPagesPager\getQueryInfo(), DeletedContribsPager\getQueryInfo(), ActiveUsersPager\getQueryInfo(), UsersPager\getQueryInfo(), BlockListPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), ApiComparePages\getRevisionById(), DifferenceEngine\getRevisionHeader(), LogEventsList\getShowHideLinks(), Skin\getSiteNotice(), UploadForm\getSourceSection(), HistoryPager\getStartBody(), ImageHistoryList\getThumbForLine(), ApiTokens\getTokenTypes(), LogEventsList\getTypeMenuDesc(), ApiOptions\getUserForUpdates(), ApiQueryInfo\getVisitingWatcherInfo(), ApiQueryInfo\getWatchedInfo(), ApiQueryInfo\getWatcherInfo(), ApiBase\getWatchlistUser(), ApiBase\getWatchlistValue(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ApiPageSet\initFromRevIDs(), ChangesList\insertDateHeader(), ChangesList\insertDiffHist(), ChangesList\insertRollback(), ApiQueryGadgets\isNeeded(), Skin\lastModified(), LogPager\limitType(), DifferenceEngine\loadNewText(), DifferenceEngine\loadText(), ApiBase\logFeatureUsage(), LogEventsList\logLine(), ApiMain\logRequest(), ApiMergeHistory\merge(), ApiMove\movePage(), ApiMove\moveSubpages(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPDisableForm\onSubmit(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPEnableForm\onSubmit(), ApiUpload\performStash(), ApiUpload\performUpload(), Skin\preloadExistence(), ApiQueryUserContribs\prepareQuery(), ApiTag\processIndividual(), DifferenceEngine\renderNewRevision(), ImportReporter\reportPage(), DifferenceEngine\revisionDeleteLink(), HistoryPager\revLink(), 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(), HTMLForm\tryAuthorizedSubmit(), RevDelList\updateLog(), DifferenceEngine\userCanEdit(), 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 104 of file ContextSource.php.

References getContext().

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

◆ msg()

ContextSource::msg (   $key,
  $params 
)

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

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

Implements MessageLocalizer.

Reimplemented in DerivativeContext.

Definition at line 168 of file ContextSource.php.

References getContext().

Referenced by UploadForm\__construct(), DeletedContribsPager\__construct(), ContribsPager\__construct(), ApiBase\addDeprecation(), DifferenceEngine\addLocalisedTitleTooltipsCb(), Skin\addToSidebar(), Skin\addToSidebarPlain(), ImageHistoryList\beginImageHistoryList(), SkinTemplate\buildContentNavigationUrls(), 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\extractAllSlotInfo(), Skin\footerLink(), Skin\footerLinkTitle(), FormatMetadata\formatCoords(), CategoryPager\formatRow(), UsersPager\formatRow(), ActiveUsersPager\formatRow(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), AllMessagesTablePager\formatValue(), LogEventsList\getActionSelectorDesc(), OOUIHTMLForm\getButtons(), VFormHTMLForm\getButtons(), PreferencesFormOOUI\getButtons(), HTMLForm\getButtons(), Skin\getCachedNotice(), Skin\getCategoryLinks(), Skin\getCopyright(), CategoryViewer\getCountMessage(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPEnableForm\getDescriptors(), DifferenceEngine\getDiff(), EnhancedChangesList\getDiffHistLinks(), TablePager\getEmptyBody(), UploadForm\getExtensionsMessage(), ApiFeedRecentChanges\getFeedObject(), BlockListPager\getFieldNames(), ProtectedPagesPager\getFieldNames(), ImageListPager\getFieldNames(), AllMessagesTablePager\getFieldNames(), LogEventsList\getFiltersDesc(), ApiBase\getFinalParamDescription(), CategoryViewer\getHTML(), CategoryViewer\getImageSection(), EditWatchlistNormalHTMLForm\getLegend(), HTMLForm\getLegend(), TablePager\getLimitDropdown(), EnhancedChangesList\getLineData(), ApiQueryGadgetCategories\getList(), EnhancedChangesList\getLogText(), AlphabeticPager\getNavigationBar(), ReverseChronologicalPager\getNavigationBar(), TablePager\getNavigationBar(), Skin\getNewtalks(), UsersPager\getPageHeader(), CategoryViewer\getPagesSection(), ApiParse\getParsedContent(), BlockListPager\getRestrictionListHTML(), HistoryPager\getRevisionButton(), DifferenceEngine\getRevisionHeader(), UploadForm\getSourceSection(), HistoryPager\getStartBody(), AllMessagesTablePager\getStartBody(), CategoryViewer\getSubcategorySection(), HTMLForm\getSubmitText(), ImageHistoryList\getThumbForLine(), Skin\getUndeleteLink(), ApiUpload\handleStashException(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ChangesList\insertComment(), 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(), AllMessagesTablePager\reallyDoQuery(), EnhancedChangesList\recentChangesBlockGroup(), ImportReporter\reportNotice(), ImportReporter\reportPage(), ApiScribuntoConsole\runConsole(), HTMLForm\setSubmitTextMsg(), HTMLForm\setWrapperLegendMsg(), DifferenceEngine\showDiffPage(), DifferenceEngine\showMissingRevision(), LogEventsList\showOptions(), Skin\subPageSubtitle(), ApiMain\substituteResultWithError(), TraditionalImageGallery\toHTML(), and MediaWiki\Preferences\DefaultPreferencesFactory\validateSignature().

◆ setContext()

Member Data Documentation

◆ $context


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