MediaWiki REL1_32
|
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) | |
canUseWikiPage () | |
Check whether a WikiPage object can be get with getWikiPage(). | |
getConfig () | |
getLanguage () | |
getOutput () | |
getRequest () | |
getSkin () | |
getStats () | |
getTiming () | |
getTitle () | |
getUser () | |
getWikiPage () | |
Get the WikiPage object. | |
msg ( $key) | |
Get a message using the current context. | |
setConfig (Config $config) | |
setLanguage ( $language) | |
setOutput (OutputPage $output) | |
setRequest (WebRequest $request) | |
setSkin (Skin $skin) | |
setTitle (Title $title) | |
setUser (User $user) | |
setWikiPage (WikiPage $wikiPage) | |
Public Member Functions inherited from ContextSource | |
exportSession () | |
Export the resolved user IP, HTTP headers, user ID, and session ID. | |
getContext () | |
Get the base IContextSource object. | |
setContext (IContextSource $context) | |
Private Attributes | |
Config | $config |
Language | $lang |
OutputPage | $output |
WebRequest | $request |
Skin | $skin |
Timing | $timing |
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 30 of file DerivativeContext.php.
DerivativeContext::__construct | ( | IContextSource | $context | ) |
IContextSource | $context | Context to inherit from |
Definition at line 79 of file DerivativeContext.php.
References ContextSource\setContext().
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.
Reimplemented from ContextSource.
Definition at line 165 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::getConfig | ( | ) |
Reimplemented from ContextSource.
Definition at line 93 of file DerivativeContext.php.
References $config, and ContextSource\getContext().
DerivativeContext::getLanguage | ( | ) |
Reimplemented from ContextSource.
Definition at line 257 of file DerivativeContext.php.
References $lang, and ContextSource\getContext().
DerivativeContext::getOutput | ( | ) |
Reimplemented from ContextSource.
Definition at line 210 of file DerivativeContext.php.
References $output, ContextSource\getContext(), and ContextSource\getOutput().
DerivativeContext::getRequest | ( | ) |
Reimplemented from ContextSource.
Definition at line 131 of file DerivativeContext.php.
References $request, and ContextSource\getContext().
DerivativeContext::getSkin | ( | ) |
Reimplemented from ContextSource.
Definition at line 276 of file DerivativeContext.php.
References $skin, ContextSource\getContext(), and ContextSource\getSkin().
DerivativeContext::getStats | ( | ) |
Reimplemented from ContextSource.
Definition at line 106 of file DerivativeContext.php.
DerivativeContext::getTiming | ( | ) |
Reimplemented from ContextSource.
Definition at line 113 of file DerivativeContext.php.
References $timing, and ContextSource\getContext().
DerivativeContext::getTitle | ( | ) |
Reimplemented from ContextSource.
Definition at line 149 of file DerivativeContext.php.
References $title, and ContextSource\getContext().
DerivativeContext::getUser | ( | ) |
Reimplemented from ContextSource.
Definition at line 228 of file DerivativeContext.php.
References $user, and ContextSource\getContext().
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.
Reimplemented from ContextSource.
Definition at line 192 of file DerivativeContext.php.
References $wikipage, and ContextSource\getContext().
DerivativeContext::msg | ( | $key | ) |
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.
string | string[] | MessageSpecifier | $key | Message key, or array of keys, or a MessageSpecifier. |
mixed | $args,... | Arguments to wfMessage |
Reimplemented from ContextSource.
Definition at line 296 of file DerivativeContext.php.
References $args, and wfMessage().
DerivativeContext::setConfig | ( | Config | $config | ) |
Config | $config |
Implements MutableContext.
Definition at line 86 of file DerivativeContext.php.
References $config.
DerivativeContext::setLanguage | ( | $language | ) |
MWException |
Implements MutableContext.
Definition at line 241 of file DerivativeContext.php.
DerivativeContext::setOutput | ( | OutputPage | $output | ) |
OutputPage | $output |
Implements MutableContext.
Definition at line 203 of file DerivativeContext.php.
References $output.
DerivativeContext::setRequest | ( | WebRequest | $request | ) |
WebRequest | $request |
Implements MutableContext.
Definition at line 124 of file DerivativeContext.php.
References $request.
DerivativeContext::setSkin | ( | Skin | $skin | ) |
Skin | $skin |
Implements MutableContext.
Definition at line 268 of file DerivativeContext.php.
References $skin, and ContextSource\setContext().
DerivativeContext::setTitle | ( | Title | $title | ) |
Title | $title |
Implements MutableContext.
Definition at line 142 of file DerivativeContext.php.
References $title.
DerivativeContext::setUser | ( | User | $user | ) |
User | $user |
Implements MutableContext.
Definition at line 221 of file DerivativeContext.php.
References $user.
DerivativeContext::setWikiPage | ( | WikiPage | $wikiPage | ) |
WikiPage | $wikiPage |
Implements MutableContext.
Definition at line 179 of file DerivativeContext.php.
|
private |
Definition at line 69 of file DerivativeContext.php.
Referenced by getConfig(), and setConfig().
|
private |
Definition at line 59 of file DerivativeContext.php.
Referenced by getLanguage().
|
private |
Definition at line 49 of file DerivativeContext.php.
Referenced by getOutput(), and setOutput().
|
private |
Definition at line 34 of file DerivativeContext.php.
Referenced by getRequest(), and setRequest().
|
private |
Definition at line 64 of file DerivativeContext.php.
|
private |
Definition at line 74 of file DerivativeContext.php.
Referenced by getTiming().
|
private |
Definition at line 39 of file DerivativeContext.php.
Referenced by getTitle(), and setTitle().
|
private |
Definition at line 54 of file DerivativeContext.php.
|
private |
Definition at line 44 of file DerivativeContext.php.
Referenced by getWikiPage().