MediaWiki REL1_34
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 ()
 
 getContext ()
 Get the base IContextSource object.
 
 getLanguage ()
 
 getOutput ()
 
 getRequest ()
 
 getSkin ()
 
 getStats ()
 
 getTiming ()
 
 getTitle ()
 
 getUser ()
 
 getWikiPage ()
 Get the WikiPage object.
 
 msg ( $key,... $params)
 Get a Message object with context set Parameters are the same as wfMessage()
 
 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(), 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 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 ApiMain\__construct(), HTMLForm\__construct(), ImageGalleryBase\__construct(), ApiQuery\__construct(), ApiQueryQueryPage\__construct(), ImageListPager\__construct(), ActiveUsersPager\__construct(), OutputPage\adaptCdnTTL(), OutputPage\addParserOutputMetadata(), ApiMain\addRequestedFields(), Skin\addToSidebarPlain(), UploadForm\addUploadJS(), ApiQuerySiteinfo\appendDbReplLagInfo(), ApiQuerySiteinfo\appendExtensions(), ApiQuerySiteinfo\appendFileExtensions(), ApiQuerySiteinfo\appendGeneralInfo(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendLanguageVariants(), ApiQuerySiteinfo\appendNamespaceAliases(), ApiQuerySiteinfo\appendNamespaces(), ApiQuerySiteinfo\appendProtocols(), ApiQuerySiteinfo\appendRestrictions(), ApiQuerySiteinfo\appendRightsInfo(), ApiQuerySiteinfo\appendSubscribedHooks(), ApiQuerySiteinfo\appendUploadDialog(), ApiQuerySiteinfo\appendUserGroups(), SkinTemplate\buildNavUrls(), Skin\buildSidebar(), ApiMain\checkBotReadOnly(), ApiMain\checkConditionalRequestHeaders(), OutputPage\checkLastModified(), ApiMain\checkMaxLag(), ApiUpload\checkVerification(), DifferenceEngine\debug(), OutputPage\disallowUserJs(), ApiMain\errorMessagesFromException(), ApiBlock\execute(), ApiEditPage\execute(), ApiEmailUser\execute(), ApiFeedContributions\execute(), ApiFeedRecentChanges\execute(), ApiFeedWatchlist\execute(), ApiFormatPhp\execute(), ApiLogin\execute(), ApiOpenSearch\execute(), ApiProtect\execute(), ApiQueryAllMessages\execute(), ApiQueryAllUsers\execute(), ApiQueryAuthManagerInfo\execute(), ApiQueryBlocks\execute(), ApiQueryFileRepoInfo\execute(), ApiQueryLogEvents\execute(), ApiQueryUsers\execute(), ApiRemoveAuthenticationData\execute(), ApiRollback\execute(), ApiSetPageLanguage\execute(), ApiUndelete\execute(), ApiUpload\execute(), OldChangesList\formatChangeLine(), HistoryPager\formatRow(), UsersPager\formatRow(), BlockListPager\formatValue(), HTMLForm\getAction(), OutputPage\getAdvertisedFeedTypes(), ApiImport\getAllowedImportSources(), ApiQueryLogEvents\getAllowedLogActions(), ApiFeedWatchlist\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiQueryPageImages\getAllowedParams(), ApiBlock\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(), ApiQueryUserContribs\getAllowedParams(), ApiResetPassword\getAllowedParams(), HTMLForm\getButtons(), Skin\getCachedNotice(), ApiQuerySiteinfo\getCacheMode(), OutputPage\getCacheVaryCookies(), Skin\getCategoryLinks(), ApiUpload\getChunkResult(), Skin\getCopyright(), Skin\getCopyrightIcon(), OutputPage\getCSPNonce(), ApiQueryUserInfo\getCurrentUserInfo(), UploadForm\getDescriptionSection(), HistoryPager\getEndBody(), ApiResetPassword\getExamplesMessages(), ApiLogin\getExtendedDescription(), ApiSetPageLanguage\getExtendedDescription(), UploadForm\getExtensionsMessage(), OutputPage\getFeaturePolicyReportOnly(), ImageListPager\getFieldNames(), ApiCSPReport\getFlags(), OutputPage\getFrameOptions(), OutputPage\getHeadLinksArray(), HTMLForm\getHiddenFields(), CategoryViewer\getHTML(), HTMLButtonField\getInputHTML(), EnhancedChangesList\getLineData(), Skin\getLogo(), DifferenceEngine\getMarkPatrolledLinkInfo(), ApiMain\getMaxLag(), OutputPage\getOriginTrials(), ApiPageSet\getPageTableFields(), Skin\getPoweredBy(), ActiveUsersPager\getQueryInfo(), NewFilesPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), OutputPage\getReportTo(), Skin\getSkinStylePath(), UploadForm\getSourceSection(), ApiQueryInfo\getVisitingWatcherInfo(), ApiQueryInfo\getWatcherInfo(), ApiMain\handleCORS(), ApiResetPassword\hasAnyRoutes(), OutputPage\headElement(), ApiFormatBase\initPrinter(), ApiLogin\isDeprecated(), ImageListPager\isFieldSortable(), ApiMain\logRequest(), Skin\makeFooterIcon(), ApiQueryImageInfo\mergeThumbParams(), OutputPage\output(), ApiMain\printResult(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), ChangesList\recentChangesFlags(), ApiQueryInfo\requestExtraData(), ApiQueryAllImages\run(), ApiQueryAllPages\run(), ApiQueryCategoryMembers\run(), ApiQueryExtLinksUsage\run(), ApiQuerySearch\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryAllRevisions\run(), ApiQueryBacklinksprop\run(), OutputPage\sendCacheControl(), ApiMain\sendCacheHeaders(), HTMLForm\setDisplayFormat(), ApiMain\setRequestExpectations(), SkinTemplate\setupTemplate(), OutputPage\showLagWarning(), LogEventsList\showOptions(), LoginHelper\showReturnToPage(), OutputPage\styleLink(), and ApiMain\substituteResultWithError().

◆ getContext()

ContextSource::getContext ( )

Get the base IContextSource object.

Since
1.18
Returns
IContextSource

Definition at line 40 of file ContextSource.php.

References $context, and wfDebug().

Referenced by RevisionItem\__construct(), ApiBase\__construct(), UsersPager\buildGroupLink(), canUseWikiPage(), CategoryViewer\clearCategoryState(), ApiBlock\execute(), ApiComparePages\execute(), ApiEmailUser\execute(), ApiExpandTemplates\execute(), ApiFeedContributions\execute(), ApiHelp\execute(), ApiOptions\execute(), ApiParse\execute(), ApiQueryUsers\execute(), ApiRevisionDelete\execute(), ApiUnblock\execute(), ApiUserrights\execute(), exportSession(), ApiFeedContributions\feedItem(), ChangesList\formatCharacterDifference(), ProtectedPagesPager\formatValue(), DifferenceEngine\generateContentDiffBody(), DifferenceEngine\generateTextDiffBody(), ApiUpload\getChunkResult(), getConfig(), ApiComparePages\getDiffRevision(), ApiAMCreateAccount\getFinalDescription(), ApiClientLogin\getFinalDescription(), ApiLinkAccount\getFinalDescription(), getLanguage(), EditWatchlistNormalHTMLForm\getLegend(), getOutput(), UsersPager\getPageHeader(), DifferenceEngine\getParserOutput(), ApiOptions\getPreferences(), getRequest(), getSkin(), DifferenceEngine\getSlotDiffRenderers(), UploadForm\getSourceSection(), CategoryPager\getStartForm(), getTiming(), getTitle(), ApiUserrights\getUrUser(), getUser(), getWikiPage(), HistoryPager\historyLine(), ChangesList\insertLog(), ChangesList\insertLogEntry(), ChangesList\insertRollback(), LogEventsList\logLine(), ApiParse\makeParserOptions(), msg(), PageImages\onBeforePageDisplay(), ApiUpload\performUpload(), SpecialTags\processCreateTagForm(), SpecialTags\processTagForm(), ChangesList\recentChangesFlags(), ApiOptions\resetPreferences(), MediaWiki\Preferences\DefaultPreferencesFactory\saveFormData(), SpecialComparePages\showDiff(), DifferenceEngine\showDiffPage(), LogEventsList\showOptions(), MediaWiki\Preferences\DefaultPreferencesFactory\submitForm(), 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 ApiMain\__construct(), AllMessagesTablePager\__construct(), DifferenceEngine\addHeader(), OutputPage\addInlineStyle(), ApiMain\addRequestedFields(), OutputPage\enableOOUI(), ApiFeedWatchlist\execute(), ApiHelp\execute(), ApiParamInfo\execute(), ApiQueryAllMessages\execute(), ApiQueryLanguageinfo\execute(), FormatMetadata\fetchExtendedMetadata(), OldChangesList\formatChangeLine(), SkinTemplate\formatLanguageName(), FormatMetadata\formatNum(), CategoryPager\formatRow(), ActiveUsersPager\formatRow(), NewFilesPager\formatRow(), UsersPager\formatRow(), AllMessagesTablePager\formatValue(), ProtectedPagesPager\formatValue(), BlockListPager\formatValue(), ChangesList\getArticleLink(), UploadForm\getExtensionsMessage(), CategoryViewer\getHTML(), Skin\getHtmlElementAttributes(), SkinTemplate\getLanguages(), IndexPager\getLimitLinks(), TablePager\getLimitSelectList(), AlphabeticPager\getNavigationBar(), ReverseChronologicalPager\getNavigationBar(), FormatMetadata\getPriorityLanguages(), ImageGalleryBase\getRenderLang(), BlockListPager\getRestrictionListHTML(), DifferenceEngine\getRevisionHeader(), OutputPage\getRlClientContext(), DifferenceEngine\getSlotHeader(), UploadForm\getSourceSection(), ImageHistoryList\getThumbForLine(), ChangesList\getTimestamp(), Skin\getUndeleteLink(), OutputPage\headElement(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ChangesList\insertDateHeader(), ChangesList\insertLogEntry(), ChangesList\insertUserRelatedLinks(), Skin\lastModified(), LogEventsList\logLine(), FormatMetadata\makeFormattedData(), SkinTemplate\prepareQuickTemplate(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesLine(), HistoryPager\revLink(), OutputPage\showLagWarning(), DifferenceEngine\showMissingRevision(), OutputPage\styleLink(), 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(), CategoryViewer\__construct(), UploadForm\__construct(), DifferenceEngineSlotDiffRenderer\addModules(), UploadForm\addUploadJS(), MediaWiki\Extension\OATHAuth\Special\DisableOATHForUser\alterForm(), ChangesList\beginRecentChangesList(), EnhancedChangesList\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(), HTMLForm\getHTML(), VFormHTMLForm\getHTML(), CategoryViewer\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 ApiMain\__construct(), ApiContinuationManager\__construct(), ImageListPager\__construct(), UsersPager\__construct(), IndexPager\__construct(), TablePager\__construct(), OutputPage\addAcceptLanguage(), CategoryTreeCategoryViewer\addSubcategoryObject(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiMain\checkConditionalRequestHeaders(), ApiMain\checkExecutePermissions(), OutputPage\checkLastModified(), ApiMain\checkMaxLag(), CategoryViewer\clearCategoryState(), ApiFormatBase\closePrinter(), ApiMain\createErrorPrinter(), WikiEditorHooks\editPageShowEditFormFields(), ApiCSPReport\error(), ApiCheckToken\execute(), ApiCSPReport\execute(), ApiEditPage\execute(), ApiFeedRecentChanges\execute(), ApiLogin\execute(), ApiQueryDeletedrevs\execute(), ApiQueryTokens\execute(), ApiMain\executeActionWithErrorHandling(), HTMLForm\getButtons(), OOUIHTMLForm\getButtons(), ApiQueryUserInfo\getCurrentUserInfo(), IndexPager\getDefaultQuery(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPEnableForm\getDescriptors(), LogPager\getFilterParams(), OutputPage\getHeadLinksArray(), TablePager\getHiddenFields(), ApiCSPReport\getReport(), OutputPage\getRlClientContext(), UploadForm\getSourceSection(), NewFilesPager\getStartBody(), ApiTokens\getTokenTypes(), Skin\getUndeleteLink(), ApiMain\getUpload(), ApiMain\getUserAgent(), ApiMain\getVal(), ApiMain\handleCORS(), ApiMain\handleException(), PageDataRequestHandler\handleRequest(), OutputPage\haveCacheVaryCookies(), ApiQuery\instantiateModules(), ApiQuery\isReadMode(), ApiMain\lacksSameOriginSecurity(), HTMLForm\loadData(), ApiMain\logRequest(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPDisableForm\onSubmit(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPEnableForm\onSubmit(), OutputPage\output(), HTMLForm\prepareForm(), SkinTemplate\prepareQuickTemplate(), ApiMain\reportUnusedParams(), OutputPage\returnToMain(), ApiQueryRecentChanges\run(), OutputPage\sendCacheControl(), ApiMain\sendCacheHeaders(), ApiMain\setRequestExpectations(), ApiMain\setupExternalResponse(), SkinTemplate\setupTemplateForOutput(), DifferenceEngine\showDiffPage(), OutputPage\showPermissionsErrorPage(), HTMLForm\tryAuthorizedSubmit(), OutputPage\userCanPreview(), 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.

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 LogEventsList\__construct(), UploadForm\__construct(), HistoryPager\__construct(), IndexPager\__construct(), GadgetHooks\beforePageDisplay(), ImageHistoryList\beginImageHistoryList(), ApiQuery\doExport(), CodeEditorHooks\editPageShowEditFormInitial(), LogPager\enforceActionRestrictions(), LogPager\enforcePerformerRestrictions(), MediaWiki\Extension\OATHAuth\Api\Module\ApiOATHValidate\execute(), MediaWiki\Extension\OATHAuth\Api\Module\ApiQueryOATH\execute(), ApiScribuntoConsole\execute(), ApiQueryTitleBlacklist\execute(), 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(), ApiParse\execute(), ApiPatrol\execute(), ApiProtect\execute(), ApiPurge\execute(), ApiQueryAuthManagerInfo\execute(), ApiQueryBlocks\execute(), ApiQueryDeletedrevs\execute(), ApiQueryFilearchive\execute(), ApiQueryImageInfo\execute(), ApiQueryLogEvents\execute(), ApiQueryMyStashedFiles\execute(), ApiQueryTokens\execute(), ApiRemoveAuthenticationData\execute(), ApiResetPassword\execute(), ApiRevisionDelete\execute(), ApiRollback\execute(), ApiSetNotificationTimestamp\execute(), ApiSetPageLanguage\execute(), ApiStashEdit\execute(), ApiTag\execute(), ApiUnblock\execute(), ApiUndelete\execute(), ApiUpload\execute(), ApiUserrights\execute(), ApiValidatePassword\execute(), ApiWatch\execute(), ApiQueryInfo\extractPageInfo(), ApiQueryLogEvents\extractRowInfo(), ApiFeedContributions\feedItem(), HistoryPager\formatRow(), UsersPager\formatRow(), ProtectedPagesPager\formatValue(), BlockListPager\formatValue(), ApiQueryLogEvents\getCacheMode(), ApiUpload\getChunkResult(), ApiUpload\getContextResult(), ApiQueryUserInfo\getCurrentUserInfo(), UploadForm\getDescriptionSection(), ApiComparePages\getDiffRevision(), HistoryPager\getEndBody(), ApiQueryUserInfo\getLatestContributionTime(), EnhancedChangesList\getLineData(), DifferenceEngine\getMarkPatrolledLinkInfo(), UploadForm\getOptionsSection(), ApiParse\getParsedContent(), BlockListPager\getQueryInfo(), DeletedContribsPager\getQueryInfo(), UsersPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), ApiComparePages\getRevisionById(), DifferenceEngine\getRevisionHeader(), LogEventsList\getShowHideLinks(), UploadForm\getSourceSection(), HistoryPager\getStartBody(), ImageHistoryList\getThumbForLine(), ApiTokens\getTokenTypes(), LogEventsList\getTypeMenuDesc(), ApiOptions\getUserForUpdates(), ApiQueryInfo\getVisitingWatcherInfo(), ApiQueryInfo\getWatchedInfo(), ApiQueryInfo\getWatcherInfo(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ChangesList\insertDateHeader(), ChangesList\insertDiffHist(), ChangesList\insertRollback(), ApiQueryGadgets\isNeeded(), LogPager\limitType(), DifferenceEngine\loadNewText(), DifferenceEngine\loadText(), ApiMergeHistory\merge(), ApiMove\movePage(), ApiMove\moveSubpages(), MultimediaViewerHooks\onMakeGlobalVariablesScript(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPDisableForm\onSubmit(), MediaWiki\Extension\OATHAuth\HTMLForm\TOTPEnableForm\onSubmit(), ApiUpload\performStash(), ApiUpload\performUpload(), ApiQueryUserContribs\prepareQuery(), ApiTag\processIndividual(), ImportReporter\reportPage(), DifferenceEngine\revisionDeleteLink(), HistoryPager\revLink(), ApiUpload\selectUploadModule(), DifferenceEngine\setRevisions(), SkinMonoBook\setupSkinUserCss(), ApiComparePages\setVals(), ChangesList\showAsUnpatrolled(), DifferenceEngine\showDiffPage(), RevDelList\updateLog(), and DifferenceEngine\userCanEdit().

◆ 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(), OutputPage\getJSVars(), 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(), OutputPage\addHelpLink(), DifferenceEngine\addLocalisedTitleTooltipsCb(), OutputPage\addReturnTo(), Skin\addToSidebar(), Skin\addToSidebarPlain(), OutputPage\addWikiMsgArray(), ApiQuerySiteinfo\appendSkins(), ImageHistoryList\beginImageHistoryList(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiUpload\checkPermissions(), ImportReporter\close(), ApiFormatBase\closePrinter(), FormatMetadata\collapseContactInfo(), Skin\doEditSectionLink(), ApiFeedWatchlist\execute(), ApiOptions\execute(), ApiParse\execute(), ApiQueryTags\execute(), FormatMetadata\exifMsg(), ApiQueryRevisionsBase\extractAllSlotInfo(), Skin\footerLink(), Skin\footerLinkTitle(), FormatMetadata\formatCoords(), OutputPage\formatPermissionsErrorMessage(), CategoryPager\formatRow(), ActiveUsersPager\formatRow(), UsersPager\formatRow(), AllMessagesTablePager\formatValue(), ProtectedPagesPager\formatValue(), BlockListPager\formatValue(), LogEventsList\getActionSelectorDesc(), HTMLForm\getButtons(), OOUIHTMLForm\getButtons(), VFormHTMLForm\getButtons(), PreferencesFormOOUI\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(), AllMessagesTablePager\getFieldNames(), BlockListPager\getFieldNames(), ImageListPager\getFieldNames(), ProtectedPagesPager\getFieldNames(), OutputPage\getHeadLinksArray(), CategoryViewer\getHTML(), CategoryViewer\getImageSection(), HTMLForm\getLegend(), EditWatchlistNormalHTMLForm\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(), OutputPage\headElement(), HistoryPager\historyLine(), ImageHistoryList\imageHistoryLine(), ChangesList\insertComment(), ChangesList\insertLog(), ChangesList\insertUserRelatedLinks(), FormatMetadata\langItem(), Skin\lastModified(), DifferenceEngine\localiseLineNumbersCb(), Skin\logoText(), Skin\mainPageLink(), FormatMetadata\makeFormattedData(), IndexPager\makeLink(), DifferenceEngine\markPatrolledLink(), ApiMain\modifyHelp(), ChangesList\numberofWatchingusers(), CategoryViewer\pagingLinks(), ChangesList\preCacheMessages(), SkinTemplate\prepareQuickTemplate(), Skin\printSource(), AllMessagesTablePager\reallyDoQuery(), EnhancedChangesList\recentChangesBlockGroup(), ImportReporter\reportNotice(), ImportReporter\reportPage(), ApiScribuntoConsole\runConsole(), OutputPage\setPageTitle(), HTMLForm\setSubmitTextMsg(), HTMLForm\setWrapperLegendMsg(), DifferenceEngine\showDiffPage(), OutputPage\showErrorPage(), OutputPage\showFatalError(), DifferenceEngine\showMissingRevision(), LogEventsList\showOptions(), OutputPage\showPermissionsErrorPage(), Skin\subPageSubtitle(), ApiMain\substituteResultWithError(), TraditionalImageGallery\toHTML(), MediaWiki\Preferences\DefaultPreferencesFactory\validateSignature(), OutputPage\versionRequired(), and OutputPage\wrapWikiMsg().

◆ setContext()

Member Data Documentation

◆ $context


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