MediaWiki  REL1_23
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:

List of all members.

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 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

Detailed Description

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.


Member Function Documentation

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 99 of file ContextSource.php.

Referenced by SkinTemplate\buildContentNavigationUrls().

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 188 of file ContextSource.php.

Get the Config object.

Since:
1.23
Returns:
Config

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 67 of file ContextSource.php.

Get the Language object.

Deprecated:
since 1.19 Use getLanguage instead
Returns:
Language

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 142 of file ContextSource.php.

Get the Skin object.

Since:
1.18
Returns:
Skin

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 164 of file ContextSource.php.

Referenced by OutputPage\buildCssLinks().

Get the User object.

Since:
1.18
Returns:
User

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 132 of file ContextSource.php.

Referenced by IndexPager\__construct(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiProtect\execute(), ApiCreateAccount\execute(), ApiUndelete\execute(), ApiEmailUser\execute(), ApiMove\execute(), ApiRevisionDelete\execute(), ApiImport\execute(), ApiUpload\execute(), ApiLogout\execute(), ApiWatch\execute(), ApiEditPage\execute(), ApiSetNotificationTimestamp\execute(), ApiPatrol\execute(), ApiOptions\execute(), ApiPurge\execute(), ApiQueryDeletedrevs\execute(), ApiUnblock\execute(), ApiRollback\execute(), ApiQueryFilearchive\execute(), ApiBlock\execute(), ApiDelete\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(), PreferencesForm\getModifiedUser(), Skin\getNewtalks(), UploadForm\getOptionsSection(), DeletedContribsPager\getQueryInfo(), UsersPager\getQueryInfo(), BlockListPager\getQueryInfo(), ApiQueryUserInfo\getRateLimits(), Skin\getSiteNotice(), UploadForm\getSourceSection(), Skin\getUndeleteLink(), ApiQueryInfo\getWatchedInfo(), ApiQueryInfo\getWatcherInfo(), ApiBase\getWatchlistUser(), ApiBase\getWatchlistValue(), ImageHistoryList\imageHistoryLine(), Skin\lastModified(), DifferenceEngine\loadNewText(), ApiPurge\mustBePosted(), Skin\preloadExistence(), ApiQueryContributions\prepareQuery(), ImportReporter\reportPage(), ApiQueryWatchlist\run(), ApiQueryRecentChanges\run(), SkinTemplate\setupTemplateForOutput(), ApiBase\setWatch(), ChangesList\showAsUnpatrolled(), Skin\showEmailUser(), ApiQueryBase\showHiddenUsersAddBlockInfo(), OutputPage\showPermissionsErrorPage(), RevDel_List\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.

Since:
1.19
Returns:
WikiPage

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 112 of file ContextSource.php.

Referenced by SkinTemplate\buildContentNavigationUrls(), and SkinTemplate\prepareQuickTemplate().


Member Data Documentation


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