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

Public Member Functions

 __construct (IContextSource $context)
 
 setConfig (Config $s)
 
 getConfig ()
 
 getStats ()
 
 getTiming ()
 
 setRequest (WebRequest $r)
 
 getRequest ()
 
 setTitle (Title $t)
 
 getTitle ()
 
 canUseWikiPage ()
 
 setWikiPage (WikiPage $p)
 
 getWikiPage ()
 
 setOutput (OutputPage $o)
 
 getOutput ()
 
 setUser (User $u)
 
 getUser ()
 
 setLanguage ($l)
 
 getLanguage ()
 
 setSkin (Skin $s)
 
 getSkin ()
 
 msg ()
 
- Public Member Functions inherited from ContextSource
 getContext ()
 
 setContext (IContextSource $context)
 
 getConfig ()
 
 getRequest ()
 
 getTitle ()
 
 canUseWikiPage ()
 
 getWikiPage ()
 
 getOutput ()
 
 getUser ()
 
 getLanguage ()
 
 getSkin ()
 
 getTiming ()
 
 getStats ()
 
 msg ()
 
 exportSession ()
 

Detailed Description

An IContextSource implementation which will inherit context from another source but allow individual pieces of context to be changed locally eg: A ContextSource that can inherit from the main RequestContext but have a different Title instance set on it.

Since
1.19

Constructor & Destructor Documentation

DerivativeContext::__construct ( IContextSource  $context)

Constructor

Parameters
IContextSource$contextContext to inherit from

Member Function Documentation

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

DerivativeContext::getConfig ( )

Get the Config object

Returns
Config

Implements IContextSource.

DerivativeContext::getLanguage ( )

Get the Language object

Returns
Language
Since
1.19

Implements IContextSource.

DerivativeContext::getOutput ( )

Get the OutputPage object

Returns
OutputPage

Implements IContextSource.

DerivativeContext::getRequest ( )

Get the WebRequest object

Returns
WebRequest

Implements IContextSource.

DerivativeContext::getSkin ( )

Get the Skin object

Returns
Skin

Implements IContextSource.

DerivativeContext::getStats ( )

Get the stats object

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

Implements IContextSource.

DerivativeContext::getTiming ( )

Get the timing object

Returns
Timing

Implements IContextSource.

DerivativeContext::getTitle ( )

Get the Title object

Returns
Title|null

Implements IContextSource.

DerivativeContext::getUser ( )

Get the User object

Returns
User

Implements IContextSource.

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

DerivativeContext::msg ( )

Get a message using the current context.

This can't just inherit from ContextSource, since then it would set only the original context, and not take into account any changes.

Parameters
mixed$args,...Arguments to wfMessage
Returns
Message

Implements IContextSource.

DerivativeContext::setConfig ( Config  $s)

Set the SiteConfiguration object

Parameters
Config$s

Implements MutableContext.

DerivativeContext::setLanguage (   $l)

Set the Language object

Parameters
Language | string$lLanguage instance or language code
Exceptions
MWException
Since
1.19

Implements MutableContext.

DerivativeContext::setOutput ( OutputPage  $o)

Set the OutputPage object

Parameters
OutputPage$o

Implements MutableContext.

DerivativeContext::setRequest ( WebRequest  $r)

Set the WebRequest object

Parameters
WebRequest$r

Implements MutableContext.

DerivativeContext::setSkin ( Skin  $s)

Set the Skin object

Parameters
Skin$s

Implements MutableContext.

DerivativeContext::setTitle ( Title  $t)

Set the Title object

Parameters
Title$t

Implements MutableContext.

DerivativeContext::setUser ( User  $u)

Set the User object

Parameters
User$u

Implements MutableContext.

DerivativeContext::setWikiPage ( WikiPage  $p)

Set the WikiPage object

Since
1.19
Parameters
WikiPage$p

Implements MutableContext.


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