BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
ContextSource Class Reference
Inheritance diagram for ContextSource:
Collaboration diagram for ContextSource:

Public Member Functions

 getContext ()
 
 setContext (IContextSource $context)
 
 getConfig ()
 
 getRequest ()
 
 getTitle ()
 
 canUseWikiPage ()
 
 getWikiPage ()
 
 getOutput ()
 
 getUser ()
 
 getLanguage ()
 
 getSkin ()
 
 getTiming ()
 
 getStats ()
 
 msg ()
 
 exportSession ()
 

Detailed Description

The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and provide accessors to it.

Since
1.18

Member Function Documentation

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

Implements IContextSource.

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

Implements IContextSource.

ContextSource::getConfig ( )

Get the Config object

Since
1.23
Returns
Config

Implements IContextSource.

ContextSource::getContext ( )

Get the base IContextSource object

Since
1.18
Returns
IContextSource
ContextSource::getLanguage ( )

Get the Language object

Since
1.19
Returns
Language

Implements IContextSource.

ContextSource::getOutput ( )

Get the OutputPage object

Since
1.18
Returns
OutputPage

Implements IContextSource.

ContextSource::getRequest ( )

Get the WebRequest object

Since
1.18
Returns
WebRequest

Implements IContextSource.

ContextSource::getSkin ( )

Get the Skin object

Since
1.18
Returns
Skin

Implements IContextSource.

ContextSource::getStats ( )

Get the Stats object

Deprecated:
since 1.27 use a StatsdDataFactory from MediaWikiServices (preferably injected)
Since
1.25
Returns
StatsdDataFactory

Implements IContextSource.

ContextSource::getTiming ( )

Get the Timing object

Since
1.27
Returns
Timing

Implements IContextSource.

ContextSource::getTitle ( )

Get the Title object

Since
1.18
Returns
Title|null

Implements IContextSource.

ContextSource::getUser ( )

Get the User object

Since
1.18
Returns
User

Implements IContextSource.

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

Implements IContextSource.

ContextSource::msg ( )

Get a Message object with context set Parameters are the same as wfMessage()

Since
1.18
Parameters
mixed...
Returns
Message

Implements IContextSource.

ContextSource::setContext ( IContextSource  $context)

Set the IContextSource object

Since
1.18
Parameters
IContextSource$context

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