MediaWiki  1.23.8
IContextSource Interface Reference

Interface for objects which can provide a context on request. More...

Inheritance diagram for IContextSource:

Public Member Functions

 canUseWikiPage ()
 Check whether a WikiPage object can be get with getWikiPage(). More...
 
 exportSession ()
 Export the resolved user IP, HTTP headers, user ID, and session ID. More...
 
 getConfig ()
 Get the site configuration. More...
 
 getLang ()
 Get the Language object. More...
 
 getLanguage ()
 Get the Language object. More...
 
 getOutput ()
 Get the OutputPage object. More...
 
 getRequest ()
 Get the WebRequest object. More...
 
 getSkin ()
 Get the Skin object. More...
 
 getTitle ()
 Get the Title object. More...
 
 getUser ()
 Get the User object. More...
 
 getWikiPage ()
 Get the WikiPage object. More...
 
 msg ()
 Get a Message object with context set. More...
 

Detailed Description

Interface for objects which can provide a context on request.

Definition at line 29 of file IContextSource.php.

Member Function Documentation

◆ canUseWikiPage()

IContextSource::canUseWikiPage ( )

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

Implemented in DerivativeContext, RequestContext, and ContextSource.

Referenced by Action\getActionName().

◆ exportSession()

IContextSource::exportSession ( )

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

Implemented in RequestContext, and ContextSource.

◆ getConfig()

IContextSource::getConfig ( )

Get the site configuration.

Since
1.23
Returns
Config

Implemented in DerivativeContext, RequestContext, and ContextSource.

◆ getLang()

IContextSource::getLang ( )

Get the Language object.

Deprecated:
since 1.19 Use getLanguage instead
Returns
Language

Implemented in RequestContext, DerivativeContext, and ContextSource.

◆ getLanguage()

◆ getOutput()

◆ getRequest()

◆ getSkin()

IContextSource::getSkin ( )

◆ getTitle()

◆ getUser()

◆ getWikiPage()

IContextSource::getWikiPage ( )

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

Implemented in RequestContext, DerivativeContext, and ContextSource.

Referenced by Action\getActionName().

◆ msg()


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