MediaWiki REL1_37
|
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(). | |
getAuthority () | |
getConfig () | |
getLanguage () | |
getOutput () | |
getRequest () | |
getSkin () | |
getStats () | |
getTiming () | |
getTitle () | |
getUser () | |
getWikiPage () | |
Get the WikiPage object. | |
msg ( $key,... $params) | |
Get a message using the current context. | |
setAuthority (Authority $authority) | |
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. | |
getCsrfTokenSet () | |
Get a repository to obtain and match CSRF tokens. | |
setContext (IContextSource $context) | |
Private Attributes | |
Authority | $authority |
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.
@newable
Definition at line 32 of file DerivativeContext.php.
DerivativeContext::__construct | ( | IContextSource | $context | ) |
IContextSource | $context | Context to inherit from |
Definition at line 87 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 157 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::getAuthority | ( | ) |
Reimplemented from ContextSource.
Definition at line 230 of file DerivativeContext.php.
DerivativeContext::getConfig | ( | ) |
Reimplemented from ContextSource.
Definition at line 101 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::getLanguage | ( | ) |
Reimplemented from ContextSource.
Definition at line 255 of file DerivativeContext.php.
References getContext().
DerivativeContext::getOutput | ( | ) |
Reimplemented from ContextSource.
Definition at line 200 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::getRequest | ( | ) |
Reimplemented from ContextSource.
Definition at line 131 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::getSkin | ( | ) |
Reimplemented from ContextSource.
Definition at line 270 of file DerivativeContext.php.
References getContext().
DerivativeContext::getStats | ( | ) |
Reimplemented from ContextSource.
Definition at line 110 of file DerivativeContext.php.
DerivativeContext::getTiming | ( | ) |
Reimplemented from ContextSource.
Definition at line 117 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::getTitle | ( | ) |
Reimplemented from ContextSource.
Definition at line 145 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::getUser | ( | ) |
Reimplemented from ContextSource.
Definition at line 215 of file DerivativeContext.php.
References 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 186 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::msg | ( | $key, | |
$params | |||
) |
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 | ...$params |
Reimplemented from ContextSource.
Definition at line 286 of file DerivativeContext.php.
References wfMessage().
DerivativeContext::setAuthority | ( | Authority | $authority | ) |
Authority | $authority |
Implements MutableContext.
Definition at line 219 of file DerivativeContext.php.
References $authority.
DerivativeContext::setConfig | ( | Config | $config | ) |
Config | $config |
Implements MutableContext.
Definition at line 94 of file DerivativeContext.php.
References $config.
DerivativeContext::setLanguage | ( | $language | ) |
MWException |
Implements MutableContext.
Definition at line 239 of file DerivativeContext.php.
DerivativeContext::setOutput | ( | OutputPage | $output | ) |
OutputPage | $output |
Implements MutableContext.
Definition at line 193 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 262 of file DerivativeContext.php.
References ContextSource\setContext().
DerivativeContext::setTitle | ( | Title | $title | ) |
Title | $title |
Implements MutableContext.
Definition at line 138 of file DerivativeContext.php.
References $title.
DerivativeContext::setUser | ( | User | $user | ) |
User | $user |
Implements MutableContext.
Definition at line 207 of file DerivativeContext.php.
References $user.
DerivativeContext::setWikiPage | ( | WikiPage | $wikiPage | ) |
WikiPage | $wikiPage |
Implements MutableContext.
Definition at line 173 of file DerivativeContext.php.
|
private |
Definition at line 61 of file DerivativeContext.php.
Referenced by setAuthority().
|
private |
Definition at line 76 of file DerivativeContext.php.
Referenced by setConfig().
|
private |
Definition at line 66 of file DerivativeContext.php.
|
private |
Definition at line 51 of file DerivativeContext.php.
Referenced by setOutput().
|
private |
Definition at line 36 of file DerivativeContext.php.
Referenced by setRequest().
|
private |
Definition at line 71 of file DerivativeContext.php.
|
private |
Definition at line 81 of file DerivativeContext.php.
|
private |
Definition at line 41 of file DerivativeContext.php.
Referenced by setTitle().
|
private |
Definition at line 56 of file DerivativeContext.php.
Referenced by setUser().
|
private |
Definition at line 46 of file DerivativeContext.php.