MediaWiki  REL1_22
IContextSource Interface Reference

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

Inheritance diagram for IContextSource:

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

Detailed Description

Interface for objects which can provide a context on request.

Definition at line 29 of file IContextSource.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

Implemented in DerivativeContext, RequestContext, and ContextSource.

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.

Get the Language object.

Deprecated:
since 1.19 Use getLanguage instead
Returns:
Language

Implemented in RequestContext, DerivativeContext, and ContextSource.

Get the Skin object.

Returns:
Skin

Implemented in RequestContext, DerivativeContext, and ContextSource.

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.


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