MediaWiki
REL1_24
|
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(). | |
getConfig () | |
Get the Config object. | |
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. | |
msg () | |
Get a message using the current context. | |
setConfig (Config $s) | |
Set the SiteConfiguration 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 | |
Config | $config |
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.
IContextSource | $context | Context to inherit from |
Definition at line 69 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 147 of file DerivativeContext.php.
Get the Config object.
Reimplemented from ContextSource.
Definition at line 87 of file DerivativeContext.php.
Get the Language object.
Reimplemented from ContextSource.
Definition at line 253 of file DerivativeContext.php.
Get the OutputPage object.
Reimplemented from ContextSource.
Definition at line 198 of file DerivativeContext.php.
Get the WebRequest object.
Reimplemented from ContextSource.
Definition at line 109 of file DerivativeContext.php.
Get the Skin object.
Reimplemented from ContextSource.
Definition at line 276 of file DerivativeContext.php.
Get the Title object.
Reimplemented from ContextSource.
Definition at line 131 of file DerivativeContext.php.
Get the User object.
Reimplemented from ContextSource.
Definition at line 220 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 176 of file DerivativeContext.php.
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.
mixed | $args,... | Arguments to wfMessage |
Reimplemented from ContextSource.
Definition at line 294 of file DerivativeContext.php.
Set the SiteConfiguration object.
Config | $s |
Definition at line 78 of file DerivativeContext.php.
Set the Language object.
MWException |
Definition at line 235 of file DerivativeContext.php.
References Language\factory(), and RequestContext\sanitizeLangCode().
Set the OutputPage object.
OutputPage | $o |
Definition at line 189 of file DerivativeContext.php.
Set the WebRequest object.
WebRequest | $r |
Definition at line 100 of file DerivativeContext.php.
DerivativeContext::setSkin | ( | Skin $ | s | ) |
DerivativeContext::setTitle | ( | Title $ | t | ) |
DerivativeContext::setUser | ( | User $ | u | ) |
Set the WikiPage object.
WikiPage | $p |
Definition at line 163 of file DerivativeContext.php.
Config DerivativeContext::$config [private] |
Definition at line 63 of file DerivativeContext.php.
Language DerivativeContext::$lang [private] |
Definition at line 55 of file DerivativeContext.php.
OutputPage DerivativeContext::$output [private] |
Definition at line 47 of file DerivativeContext.php.
WebRequest DerivativeContext::$request [private] |
Definition at line 35 of file DerivativeContext.php.
Definition at line 59 of file DerivativeContext.php.
Definition at line 39 of file DerivativeContext.php.
Definition at line 51 of file DerivativeContext.php.
WikiPage DerivativeContext::$wikipage [private] |
Definition at line 43 of file DerivativeContext.php.