MediaWiki
1.28.0
|
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. More... | |
canUseWikiPage () | |
Check whether a WikiPage object can be get with getWikiPage(). More... | |
getConfig () | |
Get the Config object. More... | |
getLanguage () | |
Get the Language object. More... | |
getOutput () | |
Get the OutputPage object. More... | |
getRequest () | |
Get the WebRequest object. More... | |
getSkin () | |
Get the Skin object. More... | |
getStats () | |
Get the stats object. More... | |
getTiming () | |
Get the timing object. More... | |
getTitle () | |
Get the Title object. More... | |
getUser () | |
Get the User object. More... | |
getWikiPage () | |
Get the WikiPage object. More... | |
msg () | |
Get a message using the current context. More... | |
setConfig (Config $s) | |
Set the SiteConfiguration object. More... | |
setLanguage ($l) | |
Set the Language object. More... | |
setOutput (OutputPage $o) | |
Set the OutputPage object. More... | |
setRequest (WebRequest $r) | |
Set the WebRequest object. More... | |
setSkin (Skin $s) | |
Set the Skin object. More... | |
setTitle (Title $t) | |
Set the Title object. More... | |
setUser (User $u) | |
Set the User object. More... | |
setWikiPage (WikiPage $p) | |
Set the WikiPage object. More... | |
Public Member Functions inherited from ContextSource | |
canUseWikiPage () | |
Check whether a WikiPage object can be get with getWikiPage(). More... | |
exportSession () | |
Export the resolved user IP, HTTP headers, user ID, and session ID. More... | |
getConfig () | |
Get the Config object. More... | |
getContext () | |
Get the base IContextSource object. More... | |
getLanguage () | |
Get the Language object. More... | |
getOutput () | |
Get the OutputPage object. More... | |
getRequest () | |
Get the WebRequest object. More... | |
getSkin () | |
Get the Skin object. More... | |
getStats () | |
Get the Stats object. More... | |
getTiming () | |
Get the Timing object. More... | |
getTitle () | |
Get the Title object. More... | |
getUser () | |
Get the User object. More... | |
getWikiPage () | |
Get the WikiPage object. More... | |
msg () | |
Get a Message object with context set Parameters are the same as wfMessage() More... | |
setContext (IContextSource $context) | |
Set the IContextSource object. More... | |
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 31 of file DerivativeContext.php.
DerivativeContext::__construct | ( | IContextSource | $context | ) |
Constructor.
IContextSource | $context | Context to inherit from |
Definition at line 81 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.
Implements IContextSource.
Definition at line 183 of file DerivativeContext.php.
References ContextSource\getContext(), and title.
DerivativeContext::getConfig | ( | ) |
Get the Config object.
Implements IContextSource.
Definition at line 99 of file DerivativeContext.php.
References $config, and ContextSource\getContext().
DerivativeContext::getLanguage | ( | ) |
Get the Language object.
Implements IContextSource.
Definition at line 289 of file DerivativeContext.php.
References $lang, and ContextSource\getContext().
DerivativeContext::getOutput | ( | ) |
Get the OutputPage object.
Implements IContextSource.
Definition at line 234 of file DerivativeContext.php.
References $output, ContextSource\getContext(), and output().
DerivativeContext::getRequest | ( | ) |
Get the WebRequest object.
Implements IContextSource.
Definition at line 145 of file DerivativeContext.php.
References $request, ContextSource\getContext(), and request.
Referenced by SpecialPageExecutor\setEditTokenFromUser().
DerivativeContext::getSkin | ( | ) |
Get the Skin object.
Implements IContextSource.
Definition at line 312 of file DerivativeContext.php.
References $skin, ContextSource\getContext(), and skin().
DerivativeContext::getStats | ( | ) |
Get the stats object.
Implements IContextSource.
Definition at line 114 of file DerivativeContext.php.
DerivativeContext::getTiming | ( | ) |
Get the timing object.
Implements IContextSource.
Definition at line 123 of file DerivativeContext.php.
References $timing, and ContextSource\getContext().
DerivativeContext::getTitle | ( | ) |
Get the Title object.
Implements IContextSource.
Definition at line 167 of file DerivativeContext.php.
References $title, ContextSource\getContext(), and title.
DerivativeContext::getUser | ( | ) |
Get the User object.
Implements IContextSource.
Definition at line 256 of file DerivativeContext.php.
References $user, ContextSource\getContext(), and user.
Referenced by SpecialPageExecutor\setEditTokenFromUser().
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.
Implements IContextSource.
Definition at line 212 of file DerivativeContext.php.
References $wikipage, and ContextSource\getContext().
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.
mixed | $args,... | Arguments to wfMessage |
Implements IContextSource.
Definition at line 330 of file DerivativeContext.php.
References $args.
DerivativeContext::setConfig | ( | Config | $s | ) |
Set the SiteConfiguration object.
Config | $s |
Implements MutableContext.
Definition at line 90 of file DerivativeContext.php.
References $s.
DerivativeContext::setLanguage | ( | $l | ) |
Set the Language object.
MWException |
Implements MutableContext.
Definition at line 271 of file DerivativeContext.php.
References Language\factory(), and RequestContext\sanitizeLangCode().
DerivativeContext::setOutput | ( | OutputPage | $o | ) |
Set the OutputPage object.
OutputPage | $o |
Implements MutableContext.
Definition at line 225 of file DerivativeContext.php.
References output().
DerivativeContext::setRequest | ( | WebRequest | $r | ) |
Set the WebRequest object.
WebRequest | $r |
Implements MutableContext.
Definition at line 136 of file DerivativeContext.php.
References request.
DerivativeContext::setSkin | ( | Skin | $s | ) |
Set the Skin object.
Skin | $s |
Implements MutableContext.
Definition at line 302 of file DerivativeContext.php.
References $s, ContextSource\setContext(), and skin().
DerivativeContext::setTitle | ( | Title | $t | ) |
Set the Title object.
Title | $t |
Implements MutableContext.
Definition at line 158 of file DerivativeContext.php.
DerivativeContext::setUser | ( | User | $u | ) |
Set the User object.
User | $u |
Implements MutableContext.
Definition at line 247 of file DerivativeContext.php.
References user.
DerivativeContext::setWikiPage | ( | WikiPage | $p | ) |
Set the WikiPage object.
WikiPage | $p |
Implements MutableContext.
Definition at line 199 of file DerivativeContext.php.
|
private |
Definition at line 70 of file DerivativeContext.php.
Referenced by getConfig().
|
private |
Definition at line 60 of file DerivativeContext.php.
Referenced by getLanguage().
|
private |
Definition at line 50 of file DerivativeContext.php.
Referenced by getOutput().
|
private |
Definition at line 35 of file DerivativeContext.php.
Referenced by getRequest().
|
private |
Definition at line 65 of file DerivativeContext.php.
Referenced by getSkin().
|
private |
Definition at line 75 of file DerivativeContext.php.
Referenced by getTiming().
|
private |
Definition at line 40 of file DerivativeContext.php.
Referenced by getTitle().
|
private |
Definition at line 55 of file DerivativeContext.php.
Referenced by getUser().
|
private |
Definition at line 45 of file DerivativeContext.php.
Referenced by getWikiPage().