MediaWiki
REL1_19
|
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(). | |
getContext () | |
Get the RequestContext object. | |
getLang () | |
Get the Language object. | |
getLanguage () | |
Get the Language object. | |
getOutput () | |
Get the OutputPage object. | |
getRequest () | |
Get the WebRequest object. | |
getSkin () | |
Get the Skin 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 | |
$context |
The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and provide accessors to it.
Definition at line 30 of file ContextSource.php.
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 89 of file ContextSource.php.
References getContext().
Referenced by OutputPage\getJSVars().
Get the RequestContext object.
Definition at line 42 of file ContextSource.php.
References RequestContext\getMain(), and wfDebug().
Referenced by ApiMain\__construct(), OutputPage\addSubtitle(), SkinTemplate\buildContentNavigationUrls(), canUseWikiPage(), DerivativeContext\canUseWikiPage(), ApiParse\categoriesHtml(), ApiBase\createContext(), ApiComparePages\execute(), ApiParse\execute(), ApiEditPage\execute(), ApiExpandTemplates\execute(), ApiPurge\execute(), ApiUnblock\execute(), ApiBlock\execute(), ApiFeedContributions\execute(), ApiLogin\execute(), ApiQueryRevisions\extractRowInfo(), Skin\generateDebugHTML(), UploadForm\getExtensionsMessage(), NewFilesPager\getForm(), OutputPage\getJSVars(), getLanguage(), DerivativeContext\getLanguage(), EditWatchlistNormalHTMLForm\getLegend(), getOutput(), DerivativeContext\getOutput(), getRequest(), DerivativeContext\getRequest(), getSkin(), DerivativeContext\getSkin(), UploadForm\getSourceSection(), getTitle(), DerivativeContext\getTitle(), HTMLForm\getTitle(), getUser(), DerivativeContext\getUser(), getWikiPage(), DerivativeContext\getWikiPage(), OutputPage\headElement(), ChangesList\insertRollback(), msg(), SkinTemplate\outputPage(), OutputPage\parserOptions(), SpecialBlock\processUIForm(), SpecialUnblock\processUIUnblock(), DifferenceEngine\renderNewRevision(), OutputPage\setHTMLTitle(), OutputPage\setPageTitle(), OutputPage\setTitle(), SpecialComparePages\showDiff(), DifferenceEngine\showDiffPage(), and SkinTemplate\tabAction().
Get the Language object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 132 of file ContextSource.php.
References getLanguage(), and wfDeprecated().
Get the Language object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 143 of file ContextSource.php.
References getContext().
Referenced by AllmessagesTablePager\__construct(), OutputPage\addInlineStyle(), Skin\buildSidebar(), ImportReporter\close(), NewFilesPager\formatRow(), CategoryPager\formatRow(), ActiveUsersPager\formatRow(), UsersPager\formatRow(), DeletedContribsPager\formatRow(), ImageListPager\formatValue(), BlockListPager\formatValue(), AllmessagesTablePager\formatValue(), Skin\getCopyright(), UploadForm\getExtensionsMessage(), CategoryViewer\getHTML(), getLang(), EditWatchlistNormalHTMLForm\getLegend(), IndexPager\getLimitLinks(), TablePager\getLimitSelect(), DeletedContribsPager\getNavigationBar(), AlphabeticPager\getNavigationBar(), ReverseChronologicalPager\getNavigationBar(), TablePager\getNavigationBar(), DifferenceEngine\getRevisionHeader(), AllmessagesTablePager\getRowAttrs(), UploadForm\getSourceSection(), OutputPage\headElement(), HistoryPager\historyLine(), ChangesList\insertArticleLink(), ChangesList\insertDateHeader(), ChangesList\insertLogEntry(), ChangesList\insertTimestamp(), ChangesList\insertUserRelatedLinks(), Skin\lastModified(), OutputPage\makeResourceLoaderLink(), ChangesList\numberofWatchingusers(), SkinTemplate\outputPage(), EnhancedChangesList\recentChangesBlockGroup(), OldChangesList\recentChangesLine(), EnhancedChangesList\recentChangesLine(), ImportReporter\reportPage(), HistoryPager\revLink(), OutputPage\showLagWarning(), and OutputPage\styleLink().
Get the OutputPage object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 112 of file ContextSource.php.
References getContext().
Referenced by UploadForm\addUploadJS(), EnhancedChangesList\beginRecentChangesList(), Skin\bottomScripts(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), ImportReporter\close(), HTMLForm\displayForm(), Skin\generateDebugHTML(), Skin\getCachedNotice(), Skin\getCategories(), Skin\getCategoryLinks(), HTMLForm\getErrors(), CategoryViewer\getHTML(), HTMLForm\getHTML(), Skin\getNewtalks(), Skin\getRevisionId(), HistoryPager\getStartBody(), Skin\lastModified(), DifferenceEngine\markPatrolledLink(), ImportReporter\open(), SkinTemplate\outputPage(), DifferenceEngine\renderNewRevision(), ImportReporter\reportNotice(), ImportReporter\reportPage(), ApiMain\sendCacheHeaders(), DifferenceEngine\showDiff(), DifferenceEngine\showDiffPage(), DifferenceEngine\showDiffStyle(), and Skin\subPageSubtitle().
Get the WebRequest object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 67 of file ContextSource.php.
References getContext().
Referenced by UsersPager\__construct(), ActiveUsersPager\__construct(), AllmessagesTablePager\__construct(), IndexPager\__construct(), ApiMain\__construct(), TablePager\__construct(), OutputPage\addAcceptLanguage(), SkinTemplate\buildContentNavigationUrls(), OutputPage\buildCssLinks(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), OutputPage\checkLastModified(), ApiMain\checkMaxLag(), ApiQueryDeletedrevs\execute(), ApiEditPage\execute(), ApiPurge\execute(), ApiUnblock\execute(), ApiBlock\execute(), ApiLogin\execute(), ApiMain\executeActionWithErrorHandling(), ApiQueryUserInfo\getCurrentUserInfo(), IndexPager\getDefaultQuery(), LogPager\getFilterParams(), NewFilesPager\getForm(), TablePager\getHiddenFields(), ApiBase\getParameterFromSettings(), OutputPage\getScriptsForBottomQueue(), UploadForm\getSourceSection(), ApiQueryUsers\getTokenFunctions(), ApiQueryRevisions\getTokenFunctions(), ApiQueryRecentChanges\getTokenFunctions(), ApiQueryInfo\getTokenFunctions(), Skin\getUndeleteLink(), OutputPage\haveCacheVaryCookies(), SkinVector\initPage(), HTMLForm\loadData(), OutputPage\makeResourceLoaderLink(), OutputPage\output(), SkinTemplate\outputPage(), OutputPage\returnToMain(), OutputPage\sendCacheControl(), ApiMain\sendCacheHeaders(), ApiMain\setupExternalResponse(), ApiMain\setupModule(), ActiveUsersPager\setupOptions(), DifferenceEngine\showDiffPage(), OutputPage\showPermissionsErrorPage(), ApiMain\substituteResultWithError(), HTMLForm\tryAuthorizedSubmit(), OutputPage\uncacheableBecauseRequestVars(), and OutputPage\userCanPreview().
Get the Skin object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 153 of file ContextSource.php.
References getContext().
Referenced by OutputPage\buildCssLinks(), OutputPage\getJSVars(), OutputPage\makeResourceLoaderLink(), OutputPage\output(), and DifferenceEngine\showDiffPage().
Get the Title object.
Implements IContextSource.
Reimplemented in ImageHistoryPseudoPager, HTMLForm, AllmessagesTablePager, ProtectedTitlesPager, and DerivativeContext.
Definition at line 77 of file ContextSource.php.
References getContext().
Referenced by OutputPage\addAcceptLanguage(), Skin\addToSidebarPlain(), OutputPage\addWikiText(), OutputPage\addWikiTextTidy(), SkinTemplate\buildContentNavigationUrls(), OutputPage\buildCssLinks(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), HistoryPager\curLink(), HistoryPager\formatRow(), Skin\getCategories(), Skin\getCategoryLinks(), Skin\getCopyright(), DifferenceEngine\getDiffLang(), HistoryPager\getEndBody(), NewFilesPager\getForm(), OutputPage\getHeadLinks(), OutputPage\getJSVars(), SkinTemplate\getNameSpaceKey(), Skin\getNamespaceNotice(), ActiveUsersPager\getPageHeader(), UsersPager\getPageHeader(), Skin\getRelevantTitle(), OutputPage\getScriptsForBottomQueue(), HistoryPager\getStartBody(), CategoryPager\getStartForm(), Skin\getUndeleteLink(), OutputPage\headElement(), HistoryPager\historyLine(), Skin\isRevisionCurrent(), HistoryPager\lastLink(), Skin\lastModified(), DifferenceEngine\loadRevisionData(), DifferenceEngine\loadRevisionIds(), IndexPager\makeLink(), SkinTemplate\outputPage(), OutputPage\parse(), Skin\preloadExistence(), OutputPage\prepareErrorPage(), Skin\printSource(), OutputPage\readOnlyPage(), EnhancedChangesList\recentChangesBlockGroup(), DifferenceEngine\renderNewRevision(), HistoryPager\revLink(), OutputPage\setFeedAppendQuery(), DifferenceEngine\showDiffPage(), Skin\subPageSubtitle(), and OutputPage\userCanPreview().
Get the User object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 122 of file ContextSource.php.
References getContext().
Referenced by IndexPager\__construct(), OutputPage\addDefaultModules(), OutputPage\blockedPage(), SkinTemplate\buildContentNavigationUrls(), OutputPage\buildCssLinks(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiMain\canApiHighLimits(), ApiMain\checkExecutePermissions(), OutputPage\checkLastModified(), DifferenceEngine\deletedLink(), ApiParse\execute(), ApiUndelete\execute(), ApiProtect\execute(), ApiMove\execute(), ApiEmailUser\execute(), ApiWatch\execute(), ApiQueryDeletedrevs\execute(), ApiImport\execute(), ApiLogout\execute(), ApiPatrol\execute(), ApiQueryFilearchive\execute(), ApiEditPage\execute(), ApiPurge\execute(), ApiUnblock\execute(), ApiUpload\execute(), ApiQueryBlocks\execute(), ApiFileRevert\execute(), ApiBlock\execute(), ApiRollback\execute(), ApiDelete\execute(), DeletedContribsPager\formatRow(), HistoryPager\formatRow(), BlockListPager\formatValue(), Skin\getCategories(), Skin\getCategoryLinks(), ApiQueryUserInfo\getCurrentUserInfo(), UploadForm\getDescriptionSection(), HistoryPager\getEndBody(), LogPager\getFilterParams(), OutputPage\getHeadLinks(), HTMLForm\getHiddenFields(), OutputPage\getJSVars(), PreferencesForm\getModifiedUser(), Skin\getNewtalks(), UploadForm\getOptionsSection(), DeletedContribsPager\getQueryInfo(), UsersPager\getQueryInfo(), BlockListPager\getQueryInfo(), NewPagesPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), DifferenceEngine\getRevisionHeader(), OutputPage\getScriptsForBottomQueue(), Skin\getSiteNotice(), UploadForm\getSourceSection(), HistoryPager\getStartBody(), Skin\getUndeleteLink(), ApiQueryInfo\getWatchedInfo(), ApiBase\getWatchlistUser(), ApiBase\getWatchlistValue(), HistoryPager\historyLine(), ChangesList\insertDiffHist(), ChangesList\insertRollback(), Skin\lastModified(), LogPager\limitPerformer(), LogPager\limitTitle(), LogPager\limitType(), OutputPage\makeResourceLoaderLink(), DifferenceEngine\markPatrolledLink(), SkinTemplate\outputPage(), ApiUpload\performUpload(), Skin\preloadExistence(), ApiQueryContributions\prepareQuery(), OutputPage\readOnlyPage(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesLine(), ImportReporter\reportPage(), DifferenceEngine\revisionDeleteLink(), HistoryPager\revLink(), ApiQueryWatchlist\run(), ApiQueryRecentChanges\run(), ApiUpload\selectUploadModule(), ApiMain\setupModule(), SkinSimple\setupSkinUserCss(), ApiBase\setWatch(), ChangesList\showAsUnpatrolled(), DifferenceEngine\showDiffPage(), Skin\showEmailUser(), ApiQueryBase\showHiddenUsersAddBlockInfo(), OutputPage\showPermissionsErrorPage(), HTMLForm\tryAuthorizedSubmit(), and OutputPage\userCanPreview().
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 102 of file ContextSource.php.
References getContext().
Referenced by HistoryPager\curLink(), OutputPage\getJSVars(), HistoryPager\getQueryInfo(), SkinTemplate\outputPage(), and DifferenceEngine\renderNewRevision().
Get a Message object with context set Parameters are the same as wfMessage()
Implements IContextSource.
Definition at line 164 of file ContextSource.php.
References getContext().
Referenced by DeletedContribsPager\__construct(), AllmessagesTablePager\__construct(), OutputPage\addBacklinkSubtitle(), OutputPage\addReturnTo(), Skin\addToSidebarPlain(), OutputPage\addWikiMsgArray(), SkinTemplate\buildContentNavigationUrls(), AllmessagesTablePager\buildForm(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiWatch\execute(), Skin\footerLink(), OutputPage\formatPermissionsErrorMessage(), CategoryPager\formatRow(), ActiveUsersPager\formatRow(), DeletedContribsPager\formatRow(), BlockListPager\formatValue(), PreferencesForm\getButtons(), Skin\getCachedNotice(), Skin\getCategoryLinks(), Skin\getCopyright(), BlockListPager\getFieldNames(), AllmessagesTablePager\getFieldNames(), OutputPage\getHeadLinks(), EditWatchlistNormalHTMLForm\getLegend(), DeletedContribsPager\getNavigationBar(), Skin\getNewtalks(), ActiveUsersPager\getPageHeader(), HistoryPager\getRevisionButton(), DifferenceEngine\getRevisionHeader(), AllmessagesTablePager\getStartBody(), HistoryPager\getStartBody(), CategoryPager\getStartForm(), Skin\getUndeleteLink(), OutputPage\headElement(), HistoryPager\historyLine(), Skin\lastModified(), DifferenceEngine\localiseLineNumbersCb(), Skin\logoText(), Skin\mainPageLink(), DifferenceEngine\markPatrolledLink(), SkinTemplate\outputPage(), Skin\printSource(), OutputPage\readOnlyPage(), ImportReporter\reportNotice(), OutputPage\setPageTitle(), HTMLForm\setSubmitTextMsg(), HTMLForm\setWrapperLegendMsg(), DifferenceEngine\showDiffPage(), OutputPage\showErrorPage(), OutputPage\showFatalError(), OutputPage\showFileCopyError(), OutputPage\showFileDeleteError(), OutputPage\showFileNotFoundError(), OutputPage\showFileRenameError(), OutputPage\showPermissionsErrorPage(), OutputPage\showUnexpectedValueError(), Skin\subPageSubtitle(), and OutputPage\versionRequired().
ContextSource::setContext | ( | IContextSource $ | context | ) |
Set the IContextSource object.
$context | IContextSource |
Definition at line 57 of file ContextSource.php.
References $context.
Referenced by RevisionListBase\__construct(), UsersPager\__construct(), ChangesList\__construct(), CategoryViewer\__construct(), ApiBase\__construct(), DifferenceEngine\__construct(), DerivativeContext\__construct(), IndexPager\__construct(), HTMLForm\__construct(), ApiMain\__construct(), OutputPage\__construct(), TablePager\__construct(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\outputPage(), DerivativeContext\setSkin(), and RequestContext\setSkin().
ContextSource::$context [private] |
Definition at line 35 of file ContextSource.php.
Referenced by UsersPager\__construct(), ActiveUsersPager\__construct(), DifferenceEngine\__construct(), IndexPager\__construct(), HTMLForm\__construct(), ApiMain\__construct(), OutputPage\__construct(), UploadForm\__construct(), TablePager\__construct(), ApiParse\categoriesHtml(), ApiParse\execute(), ApiLogin\execute(), ApiQueryRevisions\extractRowInfo(), OutputPage\makeResourceLoaderLink(), and setContext().