MediaWiki REL1_39
|
The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and provide accessors to it. More...
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. | |
getActionName () | |
Get the action name for the current web request. | |
getAuthority () | |
getConfig () | |
getContext () | |
Get the base IContextSource object. | |
getCsrfTokenSet () | |
Get a repository to obtain and match CSRF tokens. | |
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) | |
The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and provide accessors to it.
Definition at line 33 of file ContextSource.php.
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.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 103 of file ContextSource.php.
References getContext().
ContextSource::exportSession | ( | ) |
Export the resolved user IP, HTTP headers, user ID, and session ID.
The result will be reasonably sized to allow for serialization.
Implements IContextSource.
Definition at line 221 of file ContextSource.php.
References getContext().
Referenced by ApiUpload\performUpload().
ContextSource::getActionName | ( | ) |
Get the action name for the current web request.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 128 of file ContextSource.php.
ContextSource::getAuthority | ( | ) |
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 155 of file ContextSource.php.
Referenced by UploadForm\__construct(), ApiAMCreateAccount\execute(), ApiBlock\execute(), ApiChangeContentModel\execute(), ApiEditPage\execute(), ApiFileRevert\execute(), ApiImageRotate\execute(), ApiImport\execute(), ApiManageTags\execute(), ApiMove\execute(), ApiPatrol\execute(), ApiProtect\execute(), ApiQueryBlocks\execute(), ApiQueryDeletedrevs\execute(), ApiQueryFilearchive\execute(), ApiQueryImageInfo\execute(), ApiQueryLogEvents\execute(), ApiRevisionDelete\execute(), ApiRollback\execute(), ApiSetPageLanguage\execute(), ApiTag\execute(), ApiUnblock\execute(), ApiUserrights\execute(), ApiFeedContributions\feedItem(), ProtectedPagesPager\formatValue(), BlockListPager\formatValue(), ImageHistoryPseudoPager\getBody(), ApiQueryLogEvents\getCacheMode(), ApiQueryUserInfo\getCurrentUserInfo(), BlockListPager\getQueryInfo(), UploadForm\getSourceSection(), ApiMergeHistory\merge(), ApiMove\moveSubpages(), ApiUpload\performUpload(), and ApiTag\processIndividual().
ContextSource::getConfig | ( | ) |
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 72 of file ContextSource.php.
References getContext().
Referenced by ApiMain\__construct(), HTMLForm\__construct(), ImageGalleryBase\__construct(), ApiBlock\__construct(), ApiQuery\__construct(), ApiEditPage\__construct(), ApiUpload\__construct(), ApiMove\__construct(), ApiDelete\__construct(), ApiRollback\__construct(), ApiWatch\__construct(), ApiProtect\__construct(), ApiUndelete\__construct(), ApiQueryQueryPage\__construct(), ActiveUsersPager\__construct(), UploadForm\addUploadJS(), ApiQuerySiteinfo\appendDbReplLagInfo(), ApiQuerySiteinfo\appendExtensions(), ApiQuerySiteinfo\appendFileExtensions(), ApiQuerySiteinfo\appendGeneralInfo(), ApiQuerySiteinfo\appendInstalledLibraries(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendNamespaces(), ApiQuerySiteinfo\appendProtocols(), ApiQuerySiteinfo\appendRestrictions(), ApiQuerySiteinfo\appendRightsInfo(), ApiQuerySiteinfo\appendSubscribedHooks(), ApiQuerySiteinfo\appendUploadDialog(), ApiQuerySiteinfo\appendUserGroups(), OutputPage\checkLastModified(), ApiUpload\checkVerification(), DifferenceEngine\debug(), ApiBlock\execute(), ApiEditPage\execute(), ApiEmailUser\execute(), ApiFeedContributions\execute(), ApiFeedRecentChanges\execute(), ApiFeedWatchlist\execute(), ApiLogin\execute(), ApiOpenSearch\execute(), ApiQueryAllUsers\execute(), ApiQueryAuthManagerInfo\execute(), ApiQueryBlocks\execute(), ApiQueryFileRepoInfo\execute(), ApiQueryLangLinks\execute(), ApiQueryLogEvents\execute(), ApiQueryUserContribs\execute(), ApiQueryUsers\execute(), ApiRemoveAuthenticationData\execute(), ApiRollback\execute(), ApiSetPageLanguage\execute(), ApiUpload\execute(), HistoryPager\formatRow(), UsersPager\formatRow(), ApiImport\getAllowedImportSources(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllUsers\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), ApiBlock\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiOpenSearch\getAllowedParams(), ApiQueryAllDeletedRevisions\getAllowedParams(), ApiQueryAllImages\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQueryAllRevisions\getAllowedParams(), ApiQueryBacklinksprop\getAllowedParams(), ApiQueryBlocks\getAllowedParams(), ApiQueryCategoryMembers\getAllowedParams(), ApiQueryExtLinksUsage\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiQueryUserContribs\getAllowedParams(), ApiResetPassword\getAllowedParams(), ApiQuerySiteinfo\getCacheMode(), ApiQueryUserInfo\getCurrentUserInfo(), UploadForm\getDescriptionSection(), ApiResetPassword\getExamplesMessages(), ApiLogin\getExtendedDescription(), ApiSetPageLanguage\getExtendedDescription(), UploadForm\getExtensionsMessage(), ImageListPager\getFieldNames(), LogPager\getFilterParams(), SkinTemplate\getFooterIcons(), CategoryViewer\getHTML(), HTMLButtonField\getInputHTML(), EnhancedChangesList\getLineData(), DifferenceEngine\getMarkPatrolledLinkInfo(), ApiPageSet\getPageTableFields(), ActiveUsersPager\getQueryInfo(), LogPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), UploadForm\getSourceSection(), SkinFallback\getTemplateData(), ApiFormatBase\initPrinter(), ApiLogin\isDeprecated(), ImageListPager\isFieldSortable(), ApiQueryImageInfo\mergeThumbParams(), SkinTemplate\prepareQuickTemplate(), ContribsPager\reallyDoQuery(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), ChangesList\recentChangesFlags(), ApiQueryInfo\requestExtraData(), ApiQueryRecentChanges\run(), ApiQueryAllDeletedRevisions\run(), ApiQueryAllRevisions\run(), HTMLForm\setDisplayFormat(), SkinTemplate\setupTemplate(), LogEventsList\showOptions(), LoginHelper\showReturnToPage(), TraditionalImageGallery\toHTML(), and SkinTemplate\useCombinedLoginLink().
ContextSource::getContext | ( | ) |
Get the base IContextSource object.
Definition at line 47 of file ContextSource.php.
References wfDebug().
Referenced by ApiBase\__construct(), UploadForm\__construct(), RevisionItem\__construct(), canUseWikiPage(), DerivativeContext\canUseWikiPage(), CategoryViewer\clearCategoryState(), SpecialUnblock\execute(), ApiChangeContentModel\execute(), ApiComparePages\execute(), ApiEmailUser\execute(), ApiExpandTemplates\execute(), ApiFeedContributions\execute(), ApiHelp\execute(), ApiQueryUsers\execute(), ApiRevisionDelete\execute(), ApiUserrights\execute(), ApiFeedContributions\feedItem(), ProtectedPagesPager\formatValue(), getConfig(), DerivativeContext\getConfig(), FormatMetadata\getExtendedMetadataFromHook(), ApiAMCreateAccount\getFinalDescription(), ApiClientLogin\getFinalDescription(), ApiLinkAccount\getFinalDescription(), EditWatchlistNormalHTMLForm\getLegend(), getRequest(), DerivativeContext\getRequest(), CategoryPager\getStartForm(), DerivativeContext\getTiming(), getTitle(), DerivativeContext\getTitle(), getWikiPage(), DerivativeContext\getWikiPage(), ApiUpload\performUpload(), SpecialTags\processCreateTagForm(), SpecialTags\processTagForm(), MediaWiki\Preferences\DefaultPreferencesFactory\saveFormData(), SpecialComparePages\showDiff(), MediaWiki\Preferences\DefaultPreferencesFactory\submitForm(), and MediaWiki\Preferences\DefaultPreferencesFactory\validateSignature().
ContextSource::getCsrfTokenSet | ( | ) |
Get a repository to obtain and match CSRF tokens.
Implements MediaWiki\Session\CsrfTokenSetProvider.
Definition at line 231 of file ContextSource.php.
ContextSource::getLanguage | ( | ) |
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 164 of file ContextSource.php.
References getContext().
Referenced by ApiMain\__construct(), AllMessagesTablePager\__construct(), DifferenceEngine\addHeader(), ApiFeedWatchlist\execute(), ApiHelp\execute(), ApiParamInfo\execute(), ApiQueryAllMessages\execute(), ApiQueryLanguageinfo\execute(), FormatMetadata\fetchExtendedMetadata(), CategoryPager\formatRow(), ActiveUsersPager\formatRow(), NewFilesPager\formatRow(), UsersPager\formatRow(), AllMessagesTablePager\formatValue(), ProtectedPagesPager\formatValue(), BlockListPager\formatValue(), ChangesList\getArticleLink(), UploadForm\getExtensionsMessage(), CategoryViewer\getHTML(), TablePager\getLimitSelectList(), FormatMetadata\getPriorityLanguages(), ImageGalleryBase\getRenderLang(), DifferenceEngine\getRevisionHeader(), DifferenceEngine\getSlotHeader(), ImageHistoryList\getThumbForLine(), ImageHistoryList\imageHistoryLine(), ChangesList\insertDateHeader(), LogEventsList\logLine(), FormatMetadata\makeFormattedData(), SkinTemplate\prepareQuickTemplate(), EnhancedChangesList\recentChangesBlockGroup(), and EnhancedChangesList\recentChangesLine().
ContextSource::getOutput | ( | ) |
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 137 of file ContextSource.php.
References getContext().
Referenced by OOUIHTMLForm\__construct(), UploadForm\__construct(), CategoryViewer\__construct(), DifferenceEngineSlotDiffRenderer\addModules(), UploadForm\addUploadJS(), ImageHistoryList\beginImageHistoryList(), ChangesList\beginRecentChangesList(), EnhancedChangesList\beginRecentChangesList(), ImportReporter\close(), HTMLForm\displayForm(), Article\doDelete(), SkinMustache\generateHTML(), SkinTemplate\generateHTML(), VFormHTMLForm\getHTML(), CategoryViewer\getHTML(), DifferenceEngine\getMarkPatrolledLinkInfo(), TablePager\getNavigationBar(), HistoryPager\getStartBody(), SkinMustache\getTemplateData(), ImportReporter\open(), SkinTemplate\outputPage(), ImageListPager\outputUserDoesNotExist(), SkinTemplate\prepareQuickTemplate(), DifferenceEngine\renderNewRevision(), ImportReporter\reportNotice(), ImportReporter\reportPage(), Article\setOldSubtitle(), Article\showDeletedRevisionHeader(), DifferenceEngine\showDiff(), DifferenceEngine\showDiffPage(), DifferenceEngine\showDiffStyle(), Article\showMissingArticle(), Article\showPatrolFooter(), Article\showRedirectedFromHeader(), LoginHelper\showReturnToPage(), and TraditionalImageGallery\toHTML().
ContextSource::getRequest | ( | ) |
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 81 of file ContextSource.php.
References getContext().
Referenced by ApiMain\__construct(), ApiContinuationManager\__construct(), ImageListPager\__construct(), UsersPager\__construct(), IndexPager\__construct(), TablePager\__construct(), SkinTemplate\buildPersonalUrls(), OutputPage\checkLastModified(), CategoryViewer\clearCategoryState(), ApiFormatBase\closePrinter(), ApiCheckToken\execute(), ApiCSPReport\execute(), ApiEditPage\execute(), ApiFeedRecentChanges\execute(), ApiLogin\execute(), ApiQueryDeletedrevs\execute(), ApiQueryTokens\execute(), MediaWiki\Rest\Handler\ActionModuleBasedHandler\execute(), ApiQueryUserInfo\getCurrentUserInfo(), LogPager\getFilterParams(), TablePager\getHiddenFields(), SkinTemplate\getReturnToParam(), UploadForm\getSourceSection(), NewFilesPager\getStartBody(), PageDataRequestHandler\handleRequest(), ApiQuery\isReadMode(), ApiMain\lacksSameOriginSecurity(), HTMLForm\prepareForm(), SkinTemplate\prepareQuickTemplate(), ApiQueryRecentChanges\run(), SkinTemplate\setupTemplateContext(), DifferenceEngine\showDiffPage(), and HTMLForm\tryAuthorizedSubmit().
ContextSource::getSkin | ( | ) |
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 173 of file ContextSource.php.
References getContext().
Referenced by DifferenceEngine\renderNewRevision().
ContextSource::getStats | ( | ) |
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 193 of file ContextSource.php.
References wfDeprecated().
ContextSource::getTiming | ( | ) |
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 182 of file ContextSource.php.
References getContext().
ContextSource::getTitle | ( | ) |
Implements IContextSource.
Reimplemented in DerivativeContext, DifferenceEngine, HTMLForm, ImageHistoryPseudoPager, AllMessagesTablePager, ImageListPager, and ProtectedTitlesPager.
Definition at line 90 of file ContextSource.php.
References getContext().
Referenced by TablePager\getNavigationBar().
ContextSource::getUser | ( | ) |
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 147 of file ContextSource.php.
References getContext().
Referenced by ImageHistoryPseudoPager\__construct(), IndexPager\__construct(), ApiBlock\execute(), ApiChangeAuthenticationData\execute(), ApiCheckToken\execute(), ApiClearHasMsg\execute(), ApiCSPReport\execute(), ApiDelete\execute(), ApiEditPage\execute(), ApiEmailUser\execute(), ApiLinkAccount\execute(), ApiLogout\execute(), ApiMove\execute(), ApiPatrol\execute(), ApiProtect\execute(), ApiPurge\execute(), ApiQueryAuthManagerInfo\execute(), ApiQueryDeletedrevs\execute(), ApiQueryFilearchive\execute(), ApiQueryMyStashedFiles\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(), ProtectedPagesPager\formatValue(), ApiQueryUserInfo\getCurrentUserInfo(), UploadForm\getDescriptionSection(), ApiQueryUserInfo\getLatestContributionTime(), UploadForm\getOptionsSection(), ApiQueryUserInfo\getRateLimits(), ApiUpload\performUpload(), ApiTag\processIndividual(), ImportReporter\reportPage(), ApiUpload\selectUploadModule(), and MediaWiki\Preferences\DefaultPreferencesFactory\validateSignature().
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.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 117 of file ContextSource.php.
References getContext().
Referenced by HistoryPager\getQueryInfo(), and DifferenceEngine\renderNewRevision().
ContextSource::msg | ( | $key, | |
$params ) |
Get a Message object with context set Parameters are the same as wfMessage()
string | string[] | MessageSpecifier | $key | Message key, or array of keys, or a MessageSpecifier. |
mixed | ...$params |
Implements MessageLocalizer.
Reimplemented in DerivativeContext.
Definition at line 209 of file ContextSource.php.
References getContext().
Referenced by UploadForm\__construct(), ContribsPager\__construct(), DeletedContribsPager\__construct(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendSkins(), ImageHistoryList\beginImageHistoryList(), SkinTemplate\buildLoginData(), SkinTemplate\buildPersonalUrls(), ApiUpload\checkPermissions(), ImportReporter\close(), ApiFormatBase\closePrinter(), FormatMetadata\collapseContactInfo(), ApiAMCreateAccount\execute(), ApiClientLogin\execute(), ApiEditPage\execute(), ApiFeedContributions\execute(), ApiFeedWatchlist\execute(), ApiImageRotate\execute(), ApiOptions\execute(), ApiQueryAllMessages\execute(), ApiQueryTags\execute(), ApiFeedContributions\feedItemDesc(), CategoryPager\formatRow(), ActiveUsersPager\formatRow(), UsersPager\formatRow(), AllMessagesTablePager\formatValue(), ProtectedPagesPager\formatValue(), BlockListPager\formatValue(), OOUIHTMLForm\getButtons(), VFormHTMLForm\getButtons(), DifferenceEngine\getDiff(), EnhancedChangesList\getDiffHistLinks(), HistoryPager\getEmptyBody(), TablePager\getEmptyBody(), UploadForm\getExtensionsMessage(), AllMessagesTablePager\getFieldNames(), BlockListPager\getFieldNames(), ImageListPager\getFieldNames(), ProtectedPagesPager\getFieldNames(), CategoryViewer\getHTML(), EditWatchlistNormalHTMLForm\getLegend(), EnhancedChangesList\getLineData(), EnhancedChangesList\getLogText(), TablePager\getNavigationBar(), UsersPager\getPageHeader(), DifferenceEngine\getRevisionHeader(), UploadForm\getSourceSection(), HistoryPager\getStartBody(), AllMessagesTablePager\getStartBody(), SkinMustache\getTemplateData(), ImageHistoryList\getThumbForLine(), ApiUpload\handleStashException(), ImageHistoryList\imageHistoryLine(), ChangesList\insertLog(), DifferenceEngine\localiseLineNumbers(), FormatMetadata\makeFormattedData(), DifferenceEngine\markPatrolledLink(), ImageListPager\outputUserDoesNotExist(), AllMessagesTablePager\reallyDoQuery(), EnhancedChangesList\recentChangesBlockGroup(), ImportReporter\reportNotice(), ImportReporter\reportPage(), Article\showDeletedRevisionHeader(), DifferenceEngine\showDiffPage(), TraditionalImageGallery\toHTML(), and MediaWiki\Preferences\DefaultPreferencesFactory\validateSignature().
ContextSource::setContext | ( | IContextSource | $context | ) |
IContextSource | $context |
Definition at line 63 of file ContextSource.php.
Referenced by LogEventsList\__construct(), ChangesList\__construct(), ApiMain\__construct(), DifferenceEngine\__construct(), HTMLForm\__construct(), ImageHistoryList\__construct(), ImageGalleryBase\__construct(), ApiBase\__construct(), UploadForm\__construct(), DerivativeContext\__construct(), OutputPage\__construct(), LoginHelper\__construct(), ImageListPager\__construct(), UsersPager\__construct(), RevisionListBase\__construct(), IndexPager\__construct(), TablePager\__construct(), CategoryViewer\__construct(), ChangesList\flag(), FormatMetadata\flattenArrayContentLang(), FormatMetadata\getFormattedData(), DerivativeContext\setSkin(), and RequestContext\setSkin().