MediaWiki REL1_33
|
Allows changing specific properties of a context object, without changing the main one. More...
Public Member Functions | |
__construct (ResourceLoaderContext $context) | |
getContentOverrideCallback () | |
Return the replaced-content mapping callback. | |
getDebug () | |
getDirection () | |
getLanguage () | |
getModules () | |
getOnly () | |
getRaw () | |
getRequest () | |
getResourceLoader () | |
getSkin () | |
getUser () | |
getVersion () | |
setContentOverrideCallback ( $callback) | |
setDebug ( $debug) | |
setDirection ( $direction) | |
setLanguage ( $language) | |
setModules (array $modules) | |
setOnly ( $only) | |
setRaw ( $raw) | |
setSkin ( $skin) | |
setUser ( $user) | |
setVersion ( $version) | |
Public Member Functions inherited from ResourceLoaderContext | |
__construct (ResourceLoader $resourceLoader, WebRequest $request) | |
getConfig () | |
getFormat () | |
getHash () | |
All factors that uniquely identify this request, except 'modules'. | |
getImage () | |
getImageObj () | |
If this is a request for an image, get the ResourceLoaderImage object. | |
getLogger () | |
getUserObj () | |
Get the possibly-cached User object for the specified username. | |
getVariant () | |
msg ( $key) | |
Get a Message object with context set. | |
shouldIncludeMessages () | |
shouldIncludeScripts () | |
shouldIncludeStyles () | |
Public Attributes | |
const | INHERIT_VALUE = -1 |
Protected Attributes | |
$contentOverrideCallback = self::INHERIT_VALUE | |
$debug = self::INHERIT_VALUE | |
$direction = self::INHERIT_VALUE | |
$language = self::INHERIT_VALUE | |
$modules = self::INHERIT_VALUE | |
$only = self::INHERIT_VALUE | |
$raw = self::INHERIT_VALUE | |
$skin = self::INHERIT_VALUE | |
$user = self::INHERIT_VALUE | |
$version = self::INHERIT_VALUE | |
Protected Attributes inherited from ResourceLoaderContext | |
$debug | |
$direction | |
$format | |
$hash | |
$image | |
$imageObj | |
$language | |
$logger | |
$modules | |
$only | |
$raw | |
$request | |
$resourceLoader | |
$skin | |
$user | |
$userObj | |
$variant | |
$version | |
Private Attributes | |
ResourceLoaderContext | $context |
Additional Inherited Members | |
Static Public Member Functions inherited from ResourceLoaderContext | |
static | expandModuleNames ( $modules) |
Reverse the process done by ResourceLoader::makePackedModulesString(). | |
static | newDummyContext () |
Return a dummy ResourceLoaderContext object suitable for passing into things that don't "really" need a context. | |
Allows changing specific properties of a context object, without changing the main one.
Inspired by DerivativeContext.
Definition at line 30 of file DerivativeResourceLoaderContext.php.
DerivativeResourceLoaderContext::__construct | ( | ResourceLoaderContext | $context | ) |
Definition at line 49 of file DerivativeResourceLoaderContext.php.
References $context.
DerivativeResourceLoaderContext::getContentOverrideCallback | ( | ) |
Return the replaced-content mapping callback.
When editing a page that's used to generate the scripts or styles of a ResourceLoaderWikiModule, a preview should use the to-be-saved version of the page rather than the current version in the database. A context supporting such previews should return a callback to return these mappings here.
Content|null func( Title $t )
Reimplemented from ResourceLoaderContext.
Definition at line 200 of file DerivativeResourceLoaderContext.php.
References $contentOverrideCallback.
DerivativeResourceLoaderContext::getDebug | ( | ) |
Reimplemented from ResourceLoaderContext.
Definition at line 133 of file DerivativeResourceLoaderContext.php.
References $debug.
DerivativeResourceLoaderContext::getDirection | ( | ) |
Reimplemented from ResourceLoaderContext.
Definition at line 84 of file DerivativeResourceLoaderContext.php.
References $direction, and getLanguage().
DerivativeResourceLoaderContext::getLanguage | ( | ) |
Reimplemented from ResourceLoaderContext.
Definition at line 67 of file DerivativeResourceLoaderContext.php.
References $language, and language().
Referenced by getDirection().
DerivativeResourceLoaderContext::getModules | ( | ) |
Reimplemented from ResourceLoaderContext.
Definition at line 53 of file DerivativeResourceLoaderContext.php.
References $modules.
DerivativeResourceLoaderContext::getOnly | ( | ) |
Reimplemented from ResourceLoaderContext.
Definition at line 148 of file DerivativeResourceLoaderContext.php.
References $only.
DerivativeResourceLoaderContext::getRaw | ( | ) |
Reimplemented from ResourceLoaderContext.
Definition at line 178 of file DerivativeResourceLoaderContext.php.
References $raw.
DerivativeResourceLoaderContext::getRequest | ( | ) |
Reimplemented from ResourceLoaderContext.
Definition at line 192 of file DerivativeResourceLoaderContext.php.
DerivativeResourceLoaderContext::getResourceLoader | ( | ) |
Reimplemented from ResourceLoaderContext.
Definition at line 196 of file DerivativeResourceLoaderContext.php.
DerivativeResourceLoaderContext::getSkin | ( | ) |
Reimplemented from ResourceLoaderContext.
Definition at line 102 of file DerivativeResourceLoaderContext.php.
References $skin.
DerivativeResourceLoaderContext::getUser | ( | ) |
Reimplemented from ResourceLoaderContext.
Definition at line 117 of file DerivativeResourceLoaderContext.php.
References $user.
DerivativeResourceLoaderContext::getVersion | ( | ) |
Reimplemented from ResourceLoaderContext.
Definition at line 163 of file DerivativeResourceLoaderContext.php.
DerivativeResourceLoaderContext::setContentOverrideCallback | ( | $callback | ) |
callable | null | int | $callback | As per self::getContentOverrideCallback, or self::INHERIT_VALUE |
Definition at line 213 of file DerivativeResourceLoaderContext.php.
DerivativeResourceLoaderContext::setDebug | ( | $debug | ) |
bool | $debug |
Definition at line 143 of file DerivativeResourceLoaderContext.php.
References $debug.
DerivativeResourceLoaderContext::setDirection | ( | $direction | ) |
string | $direction |
Definition at line 97 of file DerivativeResourceLoaderContext.php.
References $direction.
DerivativeResourceLoaderContext::setLanguage | ( | $language | ) |
string | $language |
Definition at line 77 of file DerivativeResourceLoaderContext.php.
References $language, and language().
DerivativeResourceLoaderContext::setModules | ( | array | $modules | ) |
string[] | $modules |
Definition at line 63 of file DerivativeResourceLoaderContext.php.
References $modules.
DerivativeResourceLoaderContext::setOnly | ( | $only | ) |
string | null | $only |
Definition at line 158 of file DerivativeResourceLoaderContext.php.
References $only.
DerivativeResourceLoaderContext::setRaw | ( | $raw | ) |
bool | $raw |
Definition at line 188 of file DerivativeResourceLoaderContext.php.
References $raw.
DerivativeResourceLoaderContext::setSkin | ( | $skin | ) |
string | $skin |
Definition at line 112 of file DerivativeResourceLoaderContext.php.
References $skin.
DerivativeResourceLoaderContext::setUser | ( | $user | ) |
string | null | $user |
Definition at line 127 of file DerivativeResourceLoaderContext.php.
References $user.
DerivativeResourceLoaderContext::setVersion | ( | $version | ) |
string | null | $version |
Definition at line 173 of file DerivativeResourceLoaderContext.php.
|
protected |
Definition at line 47 of file DerivativeResourceLoaderContext.php.
Referenced by getContentOverrideCallback().
|
private |
Definition at line 36 of file DerivativeResourceLoaderContext.php.
Referenced by __construct().
|
protected |
Definition at line 43 of file DerivativeResourceLoaderContext.php.
Referenced by getDebug(), and setDebug().
|
protected |
Definition at line 40 of file DerivativeResourceLoaderContext.php.
Referenced by getDirection(), and setDirection().
|
protected |
Definition at line 39 of file DerivativeResourceLoaderContext.php.
Referenced by getLanguage(), and setLanguage().
|
protected |
Definition at line 38 of file DerivativeResourceLoaderContext.php.
Referenced by getModules(), and setModules().
|
protected |
Definition at line 44 of file DerivativeResourceLoaderContext.php.
|
protected |
Definition at line 46 of file DerivativeResourceLoaderContext.php.
|
protected |
Definition at line 41 of file DerivativeResourceLoaderContext.php.
|
protected |
Definition at line 42 of file DerivativeResourceLoaderContext.php.
|
protected |
Definition at line 45 of file DerivativeResourceLoaderContext.php.
Referenced by getVersion(), and setVersion().
const DerivativeResourceLoaderContext::INHERIT_VALUE = -1 |
Definition at line 31 of file DerivativeResourceLoaderContext.php.