MediaWiki
REL1_24
|
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. | |
getConfig () | |
Get the Config object. | |
getContext () | |
Get the base IContextSource 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 99 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 176 of file ContextSource.php.
Get the Config object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 67 of file ContextSource.php.
Referenced by ApiQueryQueryPage\__construct(), ImageListPager\__construct(), ImageGalleryBase\__construct(), ApiResult\addValue(), OutputPage\addVaryHeader(), ApiQuerySiteinfo\appendDbReplLagInfo(), ApiQuerySiteinfo\appendExtensions(), ApiQuerySiteinfo\appendFileExtensions(), ApiQuerySiteinfo\appendGeneralInfo(), ApiQuerySiteinfo\appendInterwikiMap(), ApiQuerySiteinfo\appendNamespaceAliases(), ApiQuerySiteinfo\appendProtocols(), ApiQuerySiteinfo\appendRestrictions(), ApiQuerySiteinfo\appendRightsInfo(), ApiQuerySiteinfo\appendStatistics(), ApiQuerySiteinfo\appendSubscribedHooks(), ApiQuerySiteinfo\appendUserGroups(), ApiQueryBase\checkRowCount(), ApiProtect\execute(), ApiCreateAccount\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiEditPage\execute(), ApiUpload\execute(), ApiPurge\execute(), ApiQueryAllMessages\execute(), ApiFeedContributions\execute(), ApiQueryBlocks\execute(), ApiFeedRecentChanges\execute(), ApiQueryLogEvents\execute(), ApiQueryAllUsers\execute(), ApiOpenSearch\execute(), ApiLogin\execute(), ApiFeedWatchlist\execute(), ApiQueryInfo\execute(), ApiQueryInfo\extractPageInfo(), ApiQueryRevisions\extractRowInfo(), OldChangesList\formatChangeLine(), UsersPager\formatRow(), ApiQueryLogEvents\getAllowedLogActions(), ApiOpenSearch\getAllowedParams(), ApiImport\getAllowedParams(), ApiFeedRecentChanges\getAllowedParams(), ApiFeedContributions\getAllowedParams(), ApiQueryProtectedTitles\getAllowedParams(), ApiCreateAccount\getAllowedParams(), ApiFeedWatchlist\getAllowedParams(), ApiQueryAllPages\getAllowedParams(), ApiQuerySearch\getAllowedParams(), ApiQueryLogEvents\getAllowedParams(), HTMLForm\getButtons(), ApiQuerySiteinfo\getCacheMode(), ApiQueryUserInfo\getCurrentUserInfo(), UploadForm\getDescriptionSection(), ImageListPager\getFieldNames(), NewFilesPager\getForm(), HTMLForm\getHiddenFields(), ApiQueryExtLinksUsage\getParamDescription(), ApiQueryBlocks\getParamDescription(), ApiQueryCategoryMembers\getParamDescription(), ApiQueryBacklinksprop\getParamDescription(), ApiQueryContributions\getParamDescription(), NewFilesPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), UploadForm\getSourceSection(), ApiQueryInfo\getWatcherInfo(), ApiFormatBase\initPrinter(), ImageListPager\isFieldSortable(), ApiQueryImageInfo\mergeThumbParams(), ApiQueryInfo\requestExtraData(), ApiQueryExtLinksUsage\run(), ApiQueryCategoryMembers\run(), ApiQueryQueryPage\run(), ApiQueryAllImages\run(), ApiQueryBacklinksprop\run(), and ApiMain\sendCacheHeaders().
Get the base IContextSource object.
Definition at line 40 of file ContextSource.php.
Referenced by EditPageTest\assertEdit(), ApiComparePages\execute(), ApiCreateAccount\execute(), ApiEmailUser\execute(), ApiRevisionDelete\execute(), ApiUserrights\execute(), ApiExpandTemplates\execute(), ApiOptions\execute(), ApiUnblock\execute(), ApiBlock\execute(), ApiFeedContributions\execute(), ApiLogin\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\extractRowInfo(), ProtectedPagesPager\formatValue(), NewFilesPager\getForm(), RevisionItem\getIdField(), EditWatchlistNormalHTMLForm\getLegend(), UploadForm\getSourceSection(), NewFilesPager\getStartBody(), HTMLForm\getTitle(), ApiUserrights\getUrUser(), SpecialUnblock\processUIUnblock(), SideBarTest\setUp(), SpecialComparePages\showDiff(), and ApiWatch\watchTitle().
Get the Language object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 142 of file ContextSource.php.
Referenced by Skin\buildSidebar(), ApiQueryAllMessages\execute(), OldChangesList\formatChangeLine(), NewFilesPager\formatRow(), UsersPager\formatRow(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), Skin\getHtmlElementAttributes(), EditWatchlistNormalHTMLForm\getLegend(), IndexPager\getLimitLinks(), TablePager\getLimitSelectList(), ReverseChronologicalPager\getNavigationBar(), AlphabeticPager\getNavigationBar(), DeletedContribsPager\getNavigationBar(), UploadForm\getSourceSection(), Skin\lastModified(), and Skin\subPageSubtitle().
Get the OutputPage object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 122 of file ContextSource.php.
Referenced by Skin\bottomScripts(), ImportReporter\close(), TablePager\getBody(), Skin\getCachedNotice(), Skin\getCategories(), Skin\getCategoryLinks(), Skin\getDefaultModules(), Skin\getNewtalks(), Skin\getRevisionId(), Skin\lastModified(), ImportReporter\open(), ImportReporter\reportNotice(), ImportReporter\reportPage(), ApiMain\sendCacheHeaders(), Skin\subPageSubtitle(), and TraditionalImageGallery\toHTML().
Get the WebRequest object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 77 of file ContextSource.php.
Referenced by TablePager\__construct(), UsersPager\__construct(), IndexPager\__construct(), ApiResult\endContinuation(), ApiCreateAccount\execute(), ApiEditPage\execute(), ApiQueryTokens\execute(), ApiQueryDeletedrevs\execute(), ApiRollback\execute(), ApiLogin\execute(), ApiQueryUserInfo\getCurrentUserInfo(), LogEventsList\getDefaultQuery(), NewFilesPager\getForm(), TablePager\getHiddenFields(), UploadForm\getSourceSection(), NewFilesPager\getStartBody(), ApiQueryRevisions\getTokenFunctions(), ApiQueryRecentChanges\getTokenFunctions(), ApiQueryUsers\getTokenFunctions(), ApiQueryInfo\getTokenFunctions(), ApiTokens\getTokenTypes(), Skin\getUndeleteLink(), ApiQueryRecentChanges\run(), ApiMain\sendCacheHeaders(), and HTMLForm\tryAuthorizedSubmit().
Get the Skin object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 152 of file ContextSource.php.
Referenced by DerivativeResourceLoaderContext\getSkin().
Get the Title object.
Implements IContextSource.
Reimplemented in ImageHistoryPseudoPager, HTMLForm, ImageListPager, AllMessagesTablePager, ProtectedTitlesPager, and DerivativeContext.
Definition at line 87 of file ContextSource.php.
Referenced by Skin\addToSidebarPlain(), ApiEditPage\execute(), Skin\getCategories(), Skin\getCategoryLinks(), Skin\getCopyright(), NewFilesPager\getForm(), Skin\getNamespaceNotice(), UsersPager\getPageHeader(), Skin\getRelevantTitle(), Skin\getUndeleteLink(), Skin\isRevisionCurrent(), Skin\lastModified(), Skin\preloadExistence(), Skin\printSource(), OutputPage\showFileRenameError(), and Skin\subPageSubtitle().
Get the User object.
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 132 of file ContextSource.php.
Referenced by IndexPager\__construct(), ApiClearHasMsg\execute(), ApiCreateAccount\execute(), ApiProtect\execute(), ApiUndelete\execute(), ApiMove\execute(), ApiEmailUser\execute(), ApiRevisionDelete\execute(), ApiImport\execute(), ApiEditPage\execute(), ApiLogout\execute(), ApiUpload\execute(), ApiWatch\execute(), ApiSetNotificationTimestamp\execute(), ApiPatrol\execute(), ApiQueryTokens\execute(), ApiOptions\execute(), ApiQueryDeletedrevs\execute(), ApiUnblock\execute(), ApiPurge\execute(), ApiRollback\execute(), ApiQueryFilearchive\execute(), ApiDelete\execute(), ApiBlock\execute(), ApiQueryBlocks\execute(), ApiQueryLogEvents\execute(), ApiQueryImageInfo\execute(), ApiImageRotate\execute(), ApiQueryRevisions\execute(), ApiQueryWatchlist\extractRowInfo(), ApiQueryLogEvents\extractRowInfo(), ApiQueryRecentChanges\extractRowInfo(), ApiQueryRevisions\extractRowInfo(), UsersPager\formatRow(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), ApiQueryLogEvents\getCacheMode(), Skin\getCategories(), Skin\getCategoryLinks(), ApiQueryUserInfo\getCurrentUserInfo(), UploadForm\getDescriptionSection(), HTMLForm\getHiddenFields(), PreferencesForm\getModifiedUser(), Skin\getNewtalks(), UploadForm\getOptionsSection(), DeletedContribsPager\getQueryInfo(), UsersPager\getQueryInfo(), BlockListPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), Skin\getSiteNotice(), UploadForm\getSourceSection(), Skin\getUndeleteLink(), ApiQueryInfo\getWatchedInfo(), ApiQueryInfo\getWatcherInfo(), Skin\lastModified(), DifferenceEngine\loadNewText(), ApiPurge\mustBePosted(), Skin\preloadExistence(), ApiQueryContributions\prepareQuery(), ImportReporter\reportPage(), ApiQueryWatchlist\run(), ApiQueryRecentChanges\run(), Skin\showEmailUser(), ApiQueryBase\showHiddenUsersAddBlockInfo(), HTMLForm\tryAuthorizedSubmit(), RevDelList\updateLog(), and ApiQueryBase\userCanSeeRevDel().
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 112 of file ContextSource.php.
Get a Message object with context set Parameters are the same as wfMessage()
Implements IContextSource.
Reimplemented in DerivativeContext.
Definition at line 163 of file ContextSource.php.
Referenced by DeletedContribsPager\__construct(), Skin\addToSidebarPlain(), ApiQuerySiteinfo\appendSkins(), ImportReporter\close(), Skin\footerLink(), UsersPager\formatRow(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), HTMLForm\getButtons(), PreferencesForm\getButtons(), Skin\getCachedNotice(), Skin\getCategoryLinks(), Skin\getCopyright(), TablePager\getEmptyBody(), ApiFeedRecentChanges\getFeedObject(), ImageListPager\getFieldNames(), BlockListPager\getFieldNames(), ProtectedPagesPager\getFieldNames(), OutputPage\getHeadLinks(), EditWatchlistNormalHTMLForm\getLegend(), TablePager\getLimitDropdown(), ReverseChronologicalPager\getNavigationBar(), AlphabeticPager\getNavigationBar(), DeletedContribsPager\getNavigationBar(), TablePager\getNavigationBar(), Skin\getNewtalks(), UsersPager\getPageHeader(), UploadForm\getSourceSection(), HTMLForm\getSubmitText(), Skin\getUndeleteLink(), Skin\lastModified(), Skin\logoText(), Skin\mainPageLink(), Skin\printSource(), ImportReporter\reportNotice(), ImportReporter\reportPage(), Skin\subPageSubtitle(), TraditionalImageGallery\toHTML(), and ApiWatch\watchTitle().
ContextSource::setContext | ( | IContextSource $ | context | ) |
Set the IContextSource object.
IContextSource | $context |
Definition at line 57 of file ContextSource.php.
Referenced by TablePager\__construct(), UsersPager\__construct(), ImageGalleryBase\__construct(), IndexPager\__construct(), CategoryViewer\getHTML(), DifferenceEngine\setReducedLineNumbers(), and OutputPage\setStatusCode().
IContextSource ContextSource::$context [private] |
Definition at line 33 of file ContextSource.php.
Referenced by TablePager\__construct(), UsersPager\__construct(), ImageGalleryBase\__construct(), IndexPager\__construct(), ApiCreateAccount\execute(), ApiLogin\execute(), ApiQueryUsers\execute(), ApiQueryRevisions\extractRowInfo(), NewFilesPager\getForm(), ImageGalleryBase\loadModes(), DifferenceEngine\setReducedLineNumbers(), and OutputPage\setStatusCode().