BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
BlueSpice\Context Class Reference
Inheritance diagram for BlueSpice\Context:
Collaboration diagram for BlueSpice\Context:

Public Member Functions

 __construct (\IContextSource $context,\Config $config)
 
 canUseWikiPage ()
 
 exportSession ()
 
 getConfig ()
 
 getLanguage ()
 
 getOutput ()
 
 getRequest ()
 
 getSkin ()
 
 getStats ()
 
 getTiming ()
 
 getTitle ()
 
 getUser ()
 
 getWikiPage ()
 
 msg ($key)
 

Protected Attributes

 $context = null
 
 $config = null
 

Constructor & Destructor Documentation

BlueSpice\Context::__construct ( \IContextSource  $context,
\Config  $config 
)
Parameters
\IContextSource$context
\Config$config

Member Function Documentation

BlueSpice\Context::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.

BlueSpice\Context::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.

BlueSpice\Context::getConfig ( )

Get the site configuration

Since
1.23
Returns

Implements IContextSource.

BlueSpice\Context::getLanguage ( )

Get the Language object

Returns
Language
Since
1.19

Implements IContextSource.

BlueSpice\Context::getOutput ( )

Get the OutputPage object

Returns
OutputPage

Implements IContextSource.

BlueSpice\Context::getRequest ( )

Get the WebRequest object

Returns
WebRequest

Implements IContextSource.

BlueSpice\Context::getSkin ( )

Get the Skin object

Returns
Skin

Implements IContextSource.

BlueSpice\Context::getStats ( )

Get the Stats object

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

Implements IContextSource.

BlueSpice\Context::getTiming ( )

Get the Timing object

Since
1.27
Returns
Timing

Implements IContextSource.

BlueSpice\Context::getTitle ( )

Get the Title object

Returns
Title|null

Implements IContextSource.

BlueSpice\Context::getUser ( )

Get the User object

Returns
User

Implements IContextSource.

BlueSpice\Context::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.

BlueSpice\Context::msg (   $key)

This is the method for getting translated interface messages.

See Also
https://www.mediawiki.org/wiki/Manual:Messages_API
Message::__construct
Parameters
string|string[]|MessageSpecifier$key Message key, or array of keys, or a MessageSpecifier.
mixed$params,...Normal message parameters
Returns
Message

Implements MessageLocalizer.


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