MediaWiki
REL1_22
|
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. | |
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 | |
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 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 87 of file ContextSource.php.
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 174 of file ContextSource.php.
Get the RequestContext object.
Definition at line 40 of file ContextSource.php.
Referenced by SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), ApiBase\createContext(), ApiComparePages\execute(), ApiCreateAccount\execute(), ApiEmailUser\execute(), ApiWatch\execute(), ApiUserrights\execute(), ApiExpandTemplates\execute(), ApiOptions\execute(), ApiUnblock\execute(), ApiBlock\execute(), ApiFeedContributions\execute(), ApiLogin\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\extractRowInfo(), NewFilesPager\getForm(), DerivativeContext\getLanguage(), EditWatchlistNormalHTMLForm\getLegend(), NewFilesPager\getStartBody(), ApiUserrights\getUrUser(), SkinTemplate\outputPage(), SpecialBlock\processUIForm(), SpecialUnblock\processUIUnblock(), SideBarTest\setUp(), SpecialComparePages\showDiff(), and SkinTemplate\tabAction().
Get the Language object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 130 of file ContextSource.php.
Get the Language object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 141 of file ContextSource.php.
Referenced by Skin\buildSidebar(), ApiQueryAllMessages\execute(), SkinTemplate\formatLanguageName(), CategoryPager\formatRow(), NewFilesPager\formatRow(), UsersPager\formatRow(), BlockListPager\formatValue(), Skin\getCopyright(), SkinTemplate\getLanguages(), EditWatchlistNormalHTMLForm\getLegend(), IndexPager\getLimitLinks(), DeletedContribsPager\getNavigationBar(), ReverseChronologicalPager\getNavigationBar(), ImageHistoryList\imageHistoryLine(), Skin\lastModified(), SkinTemplate\outputPage(), EnhancedChangesList\recentChangesBlockGroup(), OldChangesList\recentChangesLine(), EnhancedChangesList\recentChangesLine(), and EnhancedChangesList\sideArrow().
Get the OutputPage object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 110 of file ContextSource.php.
Referenced by EnhancedChangesList\beginRecentChangesList(), Skin\bottomScripts(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), ImportReporter\close(), Skin\getCachedNotice(), Skin\getCategories(), Skin\getCategoryLinks(), Skin\getDefaultModules(), SkinTemplate\getLanguages(), Skin\getNewtalks(), Skin\getRevisionId(), Skin\lastModified(), ImportReporter\open(), SkinTemplate\outputPage(), ImportReporter\reportNotice(), ImportReporter\reportPage(), ApiMain\sendCacheHeaders(), Skin\subPageSubtitle(), and TraditionalImageGallery\toHTML().
Get the WebRequest object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 65 of file ContextSource.php.
Referenced by UsersPager\__construct(), IndexPager\__construct(), TablePager\__construct(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiCreateAccount\execute(), ApiEditPage\execute(), ApiQueryDeletedrevs\execute(), ApiLogin\execute(), ApiQueryUserInfo\getCurrentUserInfo(), LogEventsList\getDefaultQuery(), LogPager\getFilterParams(), NewFilesPager\getForm(), NewFilesPager\getStartBody(), ApiQueryUsers\getTokenFunctions(), ApiQueryRevisions\getTokenFunctions(), ApiQueryRecentChanges\getTokenFunctions(), ApiQueryInfo\getTokenFunctions(), ApiTokens\getTokenTypes(), Skin\getUndeleteLink(), SkinVector\initPage(), HTMLForm\loadData(), OutputPage\output(), SkinTemplate\outputPage(), ApiMain\sendCacheHeaders(), and SkinTemplate\setupTemplateForOutput().
Get the Skin object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 151 of file ContextSource.php.
Referenced by OutputPage\output().
Get the Title object.
Implements IContextSource.
Reimplemented in ImageHistoryPseudoPager, HTMLForm, ImageListPager, AllmessagesTablePager, ProtectedTitlesPager, and DerivativeContext.
Definition at line 75 of file ContextSource.php.
Referenced by Skin\addToSidebarPlain(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiEditPage\execute(), HistoryPager\formatRow(), Skin\getCategories(), Skin\getCategoryLinks(), Skin\getCopyright(), HistoryPager\getEndBody(), NewFilesPager\getForm(), SkinTemplate\getNameSpaceKey(), Skin\getNamespaceNotice(), UsersPager\getPageHeader(), Skin\getRelevantTitle(), CategoryPager\getStartForm(), Skin\getUndeleteLink(), Skin\isRevisionCurrent(), Skin\lastModified(), SkinTemplate\outputPage(), Skin\preloadExistence(), Skin\printSource(), EnhancedChangesList\recentChangesBlockGroup(), SkinTemplate\setupTemplateForOutput(), and Skin\subPageSubtitle().
Get the User object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 120 of file ContextSource.php.
Referenced by IndexPager\__construct(), OutputPage\blockedPage(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiCreateAccount\execute(), ApiProtect\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiMove\execute(), ApiWatch\execute(), ApiImport\execute(), ApiLogout\execute(), ApiSetNotificationTimestamp\execute(), ApiPatrol\execute(), ApiEditPage\execute(), ApiOptions\execute(), ApiUnblock\execute(), ApiUpload\execute(), ApiQueryDeletedrevs\execute(), ApiFileRevert\execute(), ApiRollback\execute(), ApiQueryFilearchive\execute(), ApiBlock\execute(), ApiDelete\execute(), ApiQueryBlocks\execute(), ApiQueryLogEvents\execute(), ApiImageRotate\execute(), ApiPurge\execute(), ApiQueryRevisions\execute(), UsersPager\formatRow(), HistoryPager\formatRow(), BlockListPager\formatValue(), ApiQueryLogEvents\getCacheMode(), Skin\getCategories(), Skin\getCategoryLinks(), ApiQueryUserInfo\getCurrentUserInfo(), HistoryPager\getEndBody(), LogPager\getFilterParams(), PreferencesForm\getModifiedUser(), Skin\getNewtalks(), DeletedContribsPager\getQueryInfo(), UsersPager\getQueryInfo(), BlockListPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), Skin\getSiteNotice(), Skin\getUndeleteLink(), ApiQueryInfo\getWatchedInfo(), ApiQueryInfo\getWatcherInfo(), ApiBase\getWatchlistUser(), ApiBase\getWatchlistValue(), ImageHistoryList\imageHistoryLine(), Skin\lastModified(), LogPager\limitPerformer(), LogPager\limitTitle(), LogPager\limitType(), ApiPurge\mustBePosted(), SkinTemplate\outputPage(), Skin\preloadExistence(), ApiQueryContributions\prepareQuery(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesLine(), ImportReporter\reportPage(), ApiQueryWatchlist\run(), ApiQueryRecentChanges\run(), SkinTemplate\setupTemplateForOutput(), ApiBase\setWatch(), ChangesList\showAsUnpatrolled(), Skin\showEmailUser(), ApiQueryBase\showHiddenUsersAddBlockInfo(), and RevDel_List\updateLog().
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 100 of file ContextSource.php.
Referenced by HistoryPager\getQueryInfo(), and SkinTemplate\outputPage().
Get a Message object with context set Parameters are the same as wfMessage()
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 162 of file ContextSource.php.
Referenced by DeletedContribsPager\__construct(), Skin\addToSidebarPlain(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ImportReporter\close(), EnhancedChangesList\downArrow(), ApiWatch\execute(), Skin\footerLink(), CategoryPager\formatRow(), UsersPager\formatRow(), BlockListPager\formatValue(), PreferencesForm\getButtons(), Skin\getCachedNotice(), Skin\getCategoryLinks(), Skin\getCopyright(), ImageListPager\getFieldNames(), BlockListPager\getFieldNames(), NewFilesPager\getForm(), EditWatchlistNormalHTMLForm\getLegend(), DeletedContribsPager\getNavigationBar(), ReverseChronologicalPager\getNavigationBar(), Skin\getNewtalks(), UsersPager\getPageHeader(), HistoryPager\getRevisionButton(), CategoryPager\getStartForm(), Skin\getUndeleteLink(), ImageHistoryList\imageHistoryLine(), Skin\lastModified(), Skin\logoText(), Skin\mainPageLink(), SkinTemplate\outputPage(), Skin\printSource(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), EnhancedChangesList\recentChangesLine(), ImportReporter\reportNotice(), ImportReporter\reportPage(), OutputPage\showFileCopyError(), OutputPage\showFileDeleteError(), OutputPage\showFileNotFoundError(), OutputPage\showFileRenameError(), EnhancedChangesList\sideArrow(), Skin\subPageSubtitle(), and TraditionalImageGallery\toHTML().
ContextSource::setContext | ( | IContextSource $ | context | ) |
Set the IContextSource object.
IContextSource | $context |
Definition at line 55 of file ContextSource.php.
Referenced by UsersPager\__construct(), ApiBase\__construct(), IndexPager\__construct(), TablePager\__construct(), SkinTemplate\buildContentNavigationUrls(), and SkinTemplate\outputPage().
IContextSource ContextSource::$context [private] |
Definition at line 33 of file ContextSource.php.
Referenced by UsersPager\__construct(), IndexPager\__construct(), TablePager\__construct(), ApiCreateAccount\execute(), ApiLogin\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\extractRowInfo(), and NewFilesPager\getForm().