MediaWiki
REL1_20
|
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...
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 | |
Language | $lang |
OutputPage | $output |
WebRequest | $request |
Skin | $skin |
Title | $title |
User | $user |
WikiPage | $wikipage |
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.
DerivativeContext::__construct | ( | IContextSource $ | context | ) |
Constructor.
$context | IContextSource Context to inherit from |
Definition at line 66 of file DerivativeContext.php.
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.
Reimplemented from ContextSource.
Definition at line 122 of file DerivativeContext.php.
Reimplemented from ContextSource.
Definition at line 236 of file DerivativeContext.php.
Get the Language object.
Reimplemented from ContextSource.
Definition at line 247 of file DerivativeContext.php.
References ContextSource\getContext().
Get the OutputPage object.
Reimplemented from ContextSource.
Definition at line 173 of file DerivativeContext.php.
Get the WebRequest object.
Reimplemented from ContextSource.
Definition at line 84 of file DerivativeContext.php.
Get the Skin object.
Reimplemented from ContextSource.
Definition at line 270 of file DerivativeContext.php.
Get the Title object.
Reimplemented from ContextSource.
Definition at line 106 of file DerivativeContext.php.
Get the User object.
Reimplemented from ContextSource.
Definition at line 195 of file DerivativeContext.php.
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.
Reimplemented from ContextSource.
Definition at line 151 of file DerivativeContext.php.
DerivativeContext::setLang | ( | $ | l | ) |
Set the Language object.
$l | Mixed Language instance or language code |
Definition at line 209 of file DerivativeContext.php.
References setLanguage(), and wfDeprecated().
Set the Language object.
$l | Mixed Language instance or language code |
Definition at line 220 of file DerivativeContext.php.
References Language\factory(), and RequestContext\sanitizeLangCode().
Referenced by setLang().
Set the OutputPage object.
$o | OutputPage |
Definition at line 164 of file DerivativeContext.php.
Set the WebRequest object.
$r | WebRequest object |
Definition at line 75 of file DerivativeContext.php.
DerivativeContext::setSkin | ( | Skin $ | s | ) |
DerivativeContext::setTitle | ( | Title $ | t | ) |
Set the Title object.
$t | Title object |
Definition at line 97 of file DerivativeContext.php.
DerivativeContext::setUser | ( | User $ | u | ) |
Set the WikiPage object.
$p | WikiPage object |
Definition at line 138 of file DerivativeContext.php.
Language DerivativeContext::$lang [private] |
Definition at line 56 of file DerivativeContext.php.
OutputPage DerivativeContext::$output [private] |
Definition at line 48 of file DerivativeContext.php.
WebRequest DerivativeContext::$request [private] |
Definition at line 36 of file DerivativeContext.php.
Skin DerivativeContext::$skin [private] |
Definition at line 60 of file DerivativeContext.php.
Title DerivativeContext::$title [private] |
Definition at line 40 of file DerivativeContext.php.
User DerivativeContext::$user [private] |
Definition at line 52 of file DerivativeContext.php.
WikiPage DerivativeContext::$wikipage [private] |
Definition at line 44 of file DerivativeContext.php.