MediaWiki REL1_30
|
Public Member Functions | |
newTestContext (WebRequest $request, User $user=null) | |
Returns a DerivativeContext with the request variables in place. | |
Public Member Functions inherited from RequestContext | |
canUseWikiPage () | |
Check whether a WikiPage object can be get with getWikiPage(). | |
exportSession () | |
Export the resolved user IP, HTTP headers, user ID, and session ID. | |
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. | |
getStats () | |
Get the Stats object. | |
getTiming () | |
Get the timing object. | |
getTitle () | |
Get the Title object. | |
getUser () | |
Get the User object. | |
getWikiPage () | |
Get the WikiPage object. | |
hasTitle () | |
Check, if a Title object is set. | |
msg ( $key) | |
Helpful methods. | |
setConfig (Config $c) | |
Set the Config object. | |
setLanguage ( $l) | |
Set the Language object. | |
setOutput (OutputPage $o) | |
setRequest (WebRequest $r) | |
Set the WebRequest object. | |
setSkin (Skin $s) | |
Set the Skin object. | |
setTitle (Title $title=null) | |
Set the Title object. | |
setUser (User $u) | |
Set the User object. | |
setWikiPage (WikiPage $p) | |
Set the WikiPage object. | |
Additional Inherited Members | |
Static Public Member Functions inherited from RequestContext | |
static | getMain () |
Static methods. | |
static | getMainAndWarn ( $func=__METHOD__) |
Get the RequestContext object associated with the main request and gives a warning to the log, to find places, where a context maybe is missing. | |
static | importScopedSession (array $params) |
Import an client IP address, HTTP headers, user ID, and session ID. | |
static | newExtraneousContext (Title $title, $request=[]) |
Create a new extraneous context. | |
static | resetMain () |
Resets singleton returned by getMain(). | |
static | sanitizeLangCode ( $code) |
Accepts a language code and ensures it's sane. | |
Definition at line 3 of file ApiTestContext.php.
ApiTestContext::newTestContext | ( | WebRequest | $request, |
User | $user = null ) |
Returns a DerivativeContext with the request variables in place.
WebRequest | $request | WebRequest request object including parameters and session |
User | null | $user | User or null |
Definition at line 12 of file ApiTestContext.php.
References $context, and RequestContext\$request.