MediaWiki
master
|
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(). More... | |
getActionName () | |
Get the action name for the current web request. More... | |
getAuthority () | |
getConfig () | |
getLanguage () | |
getOutput () | |
getRequest () | |
getSkin () | |
getTiming () | |
getTitle () | |
getUser () | |
getWikiPage () | |
Get the WikiPage object. More... | |
msg ( $key,... $params) | |
Get a message using the current context. More... | |
setActionName (string $action) | |
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) | |
![]() | |
exportSession () | |
Export the resolved user IP, HTTP headers, user ID, and session ID. More... | |
getContext () | |
Get the base IContextSource object. More... | |
getCsrfTokenSet () | |
Get a repository to obtain and match CSRF tokens. More... | |
setContext (IContextSource $context) | |
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 | ) |
IContextSource | $context | Context to inherit from |
Definition at line 92 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 154 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::getActionName | ( | ) |
Get the action name for the current web request.
Reimplemented from ContextSource.
Definition at line 210 of file DerivativeContext.php.
References getContext().
DerivativeContext::getAuthority | ( | ) |
Reimplemented from ContextSource.
Definition at line 267 of file DerivativeContext.php.
DerivativeContext::getConfig | ( | ) |
Reimplemented from ContextSource.
Definition at line 106 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::getLanguage | ( | ) |
Reimplemented from ContextSource.
Definition at line 292 of file DerivativeContext.php.
References getContext().
DerivativeContext::getOutput | ( | ) |
Reimplemented from ContextSource.
Definition at line 232 of file DerivativeContext.php.
References getContext().
DerivativeContext::getRequest | ( | ) |
Reimplemented from ContextSource.
Definition at line 127 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::getSkin | ( | ) |
Reimplemented from ContextSource.
Definition at line 307 of file DerivativeContext.php.
References getContext().
DerivativeContext::getTiming | ( | ) |
Reimplemented from ContextSource.
Definition at line 113 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::getTitle | ( | ) |
Reimplemented from ContextSource.
Definition at line 142 of file DerivativeContext.php.
References ContextSource\getContext().
DerivativeContext::getUser | ( | ) |
Reimplemented from ContextSource.
Definition at line 247 of file DerivativeContext.php.
References 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 188 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 323 of file DerivativeContext.php.
References wfMessage().
DerivativeContext::setActionName | ( | string | $action | ) |
string | $action |
Implements MutableContext.
Definition at line 200 of file DerivativeContext.php.
DerivativeContext::setAuthority | ( | Authority | $authority | ) |
Authority | $authority |
Implements MutableContext.
Definition at line 257 of file DerivativeContext.php.
DerivativeContext::setConfig | ( | Config | $config | ) |
Config | $config |
Implements MutableContext.
Definition at line 99 of file DerivativeContext.php.
DerivativeContext::setLanguage | ( | $language | ) |
MWException |
Implements MutableContext.
Definition at line 276 of file DerivativeContext.php.
References RequestContext\sanitizeLangCode().
DerivativeContext::setOutput | ( | OutputPage | $output | ) |
OutputPage | $output |
Implements MutableContext.
Definition at line 225 of file DerivativeContext.php.
DerivativeContext::setRequest | ( | WebRequest | $request | ) |
WebRequest | $request |
Implements MutableContext.
Definition at line 120 of file DerivativeContext.php.
DerivativeContext::setSkin | ( | Skin | $skin | ) |
Skin | $skin |
Implements MutableContext.
Definition at line 299 of file DerivativeContext.php.
References ContextSource\setContext().
DerivativeContext::setTitle | ( | Title | $title | ) |
Title | $title |
Implements MutableContext.
Definition at line 134 of file DerivativeContext.php.
References $title.
Referenced by setWikiPage().
DerivativeContext::setUser | ( | User | $user | ) |
User | $user |
Implements MutableContext.
Definition at line 239 of file DerivativeContext.php.
DerivativeContext::setWikiPage | ( | WikiPage | $wikiPage | ) |
WikiPage | $wikiPage |
Implements MutableContext.
Definition at line 170 of file DerivativeContext.php.
References WikiPage\getTitle(), and setTitle().