MediaWiki  REL1_20
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().
 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 88 of file ContextSource.php.

Get the Language object.

Deprecated:
1.19 Use getLanguage instead
Returns:
Language

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 131 of file ContextSource.php.

Get the Skin object.

Since:
1.18
Returns:
Skin

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 152 of file ContextSource.php.

Get the User object.

Since:
1.18
Returns:
User

Implements IContextSource.

Reimplemented in DerivativeContext.

Definition at line 121 of file ContextSource.php.

Referenced by IndexPager\__construct(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SkinTemplate\buildPersonalUrls(), ApiParse\execute(), ApiUndelete\execute(), ApiProtect\execute(), ApiEmailUser\execute(), ApiMove\execute(), ApiImport\execute(), ApiWatch\execute(), ApiQueryDeletedrevs\execute(), ApiSetNotificationTimestamp\execute(), ApiLogout\execute(), ApiPatrol\execute(), ApiEditPage\execute(), ApiQueryFilearchive\execute(), ApiPurge\execute(), ApiUpload\execute(), ApiQueryBlocks\execute(), ApiOptions\execute(), ApiUnblock\execute(), ApiFileRevert\execute(), ApiRollback\execute(), ApiBlock\execute(), ApiDelete\execute(), DeletedContribsPager\formatRow(), UsersPager\formatRow(), HistoryPager\formatRow(), ImageListPager\formatValue(), BlockListPager\formatValue(), 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(), ApiBase\getWatchlistUser(), ApiBase\getWatchlistValue(), ImageHistoryList\imageHistoryLine(), ChangesList\insertDateHeader(), Skin\lastModified(), LogPager\limitPerformer(), LogPager\limitTitle(), LogPager\limitType(), SkinTemplate\outputPage(), Skin\preloadExistence(), ApiQueryContributions\prepareQuery(), ImportReporter\reportPage(), ApiQueryWatchlist\run(), ApiQueryRecentChanges\run(), SkinSimple\setupSkinUserCss(), ApiBase\setWatch(), ChangesList\showAsUnpatrolled(), Skin\showEmailUser(), and ApiQueryBase\showHiddenUsersAddBlockInfo().

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

Referenced by HistoryPager\getQueryInfo(), and SkinTemplate\outputPage().


Member Data Documentation


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