MediaWiki  REL1_19
DerivativeContext Class Reference

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

Inheritance diagram for DerivativeContext:
Collaboration diagram for DerivativeContext:

List of all members.

Public Member Functions

 __construct (IContextSource $context)
 Constructor.
 canUseWikiPage ()
 Check whether a WikiPage object can be get with getWikiPage().
 getLang ()
 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.
 setLang ($l)
 Set the Language object.
 setLanguage ($l)
 Set the Language object.
 setOutput (OutputPage $o)
 Set the OutputPage object.
 setRequest (WebRequest $r)
 Set the WebRequest object.
 setSkin (Skin $s)
 Set the Skin object.
 setTitle (Title $t)
 Set the Title object.
 setUser (User $u)
 Set the User object.
 setWikiPage (WikiPage $p)
 Set the WikiPage object.

Private Attributes

 $lang
 $output
 $request
 $skin
 $title
 $user
 $wikipage

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.

Definition at line 32 of file DerivativeContext.php.


Constructor & Destructor Documentation

Constructor.

Parameters:
$contextIContextSource Context to inherit from

Definition at line 73 of file DerivativeContext.php.

References ContextSource\setContext().

Here is the call graph for this function:


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

Reimplemented from ContextSource.

Definition at line 129 of file DerivativeContext.php.

References ContextSource\getContext().

Here is the call graph for this function:

Deprecated:
1.19 Use getLanguage instead
Returns:
Language

Reimplemented from ContextSource.

Definition at line 243 of file DerivativeContext.php.

References getLanguage(), and wfDeprecated().

Here is the call graph for this function:

Get the Language object.

Returns:
Language
Since:
1.19

Reimplemented from ContextSource.

Definition at line 254 of file DerivativeContext.php.

References ContextSource\getContext().

Referenced by getLang().

Here is the call graph for this function:

Here is the caller graph for this function:

Get the OutputPage object.

Returns:
OutputPage object

Reimplemented from ContextSource.

Definition at line 180 of file DerivativeContext.php.

References ContextSource\getContext().

Here is the call graph for this function:

Get the WebRequest object.

Returns:
WebRequest

Reimplemented from ContextSource.

Definition at line 91 of file DerivativeContext.php.

References ContextSource\getContext().

Here is the call graph for this function:

Get the Skin object.

Returns:
Skin

Reimplemented from ContextSource.

Definition at line 277 of file DerivativeContext.php.

References ContextSource\getContext().

Here is the call graph for this function:

Get the Title object.

Returns:
Title

Reimplemented from ContextSource.

Definition at line 113 of file DerivativeContext.php.

References ContextSource\getContext().

Here is the call graph for this function:

Get the User object.

Returns:
User

Reimplemented from ContextSource.

Definition at line 202 of file DerivativeContext.php.

References ContextSource\getContext().

Here is the call graph for this function:

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

Reimplemented from ContextSource.

Definition at line 158 of file DerivativeContext.php.

References ContextSource\getContext().

Here is the call graph for this function:

Set the Language object.

Deprecated:
1.19 Use setLanguage instead
Parameters:
$lMixed Language instance or language code

Definition at line 216 of file DerivativeContext.php.

References setLanguage(), and wfDeprecated().

Here is the call graph for this function:

Set the Language object.

Parameters:
$lMixed Language instance or language code
Since:
1.19

Definition at line 227 of file DerivativeContext.php.

References Language\factory(), and RequestContext\sanitizeLangCode().

Referenced by setLang().

Here is the call graph for this function:

Here is the caller graph for this function:

Set the OutputPage object.

Parameters:
$oOutputPage

Definition at line 171 of file DerivativeContext.php.

Set the WebRequest object.

Parameters:
$rWebRequest object

Definition at line 82 of file DerivativeContext.php.

Set the Skin object.

Parameters:
$sSkin

Definition at line 267 of file DerivativeContext.php.

References ContextSource\setContext().

Here is the call graph for this function:

Set the Title object.

Parameters:
$tTitle object

Definition at line 104 of file DerivativeContext.php.

References $t.

Set the User object.

Parameters:
$uUser

Definition at line 193 of file DerivativeContext.php.

Set the WikiPage object.

Since:
1.19
Parameters:
$pWikiPage object

Definition at line 145 of file DerivativeContext.php.


Member Data Documentation

DerivativeContext::$lang [private]

Definition at line 62 of file DerivativeContext.php.

DerivativeContext::$output [private]

Definition at line 52 of file DerivativeContext.php.

DerivativeContext::$request [private]

Definition at line 37 of file DerivativeContext.php.

DerivativeContext::$skin [private]

Definition at line 67 of file DerivativeContext.php.

DerivativeContext::$title [private]

Definition at line 42 of file DerivativeContext.php.

DerivativeContext::$user [private]

Definition at line 57 of file DerivativeContext.php.

DerivativeContext::$wikipage [private]

Definition at line 47 of file DerivativeContext.php.


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