MediaWiki  1.28.0
DerivativeResourceLoaderContext Class Reference

Allows changing specific properties of a context object, without changing the main one. More...

Inheritance diagram for DerivativeResourceLoaderContext:
Collaboration diagram for DerivativeResourceLoaderContext:

Public Member Functions

 __construct (ResourceLoaderContext $context)
 
 getDebug ()
 
 getDirection ()
 
 getLanguage ()
 
 getModules ()
 
 getOnly ()
 
 getRaw ()
 
 getRequest ()
 
 getResourceLoader ()
 
 getSkin ()
 
 getUser ()
 
 getVersion ()
 
 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)
 
 getDebug ()
 
 getDirection ()
 
 getFormat ()
 
 getHash ()
 All factors that uniquely identify this request, except 'modules'. More...
 
 getImage ()
 
 getImageObj ()
 If this is a request for an image, get the ResourceLoaderImage object. More...
 
 getLanguage ()
 
 getLogger ()
 
 getModules ()
 
 getOnly ()
 
 getRaw ()
 
 getRequest ()
 
 getResourceLoader ()
 
 getSkin ()
 
 getUser ()
 
 getUserObj ()
 Get the possibly-cached User object for the specified username. More...
 
 getVariant ()
 
 getVersion ()
 
 msg ()
 Get a Message object with context set. More...
 
 shouldIncludeMessages ()
 
 shouldIncludeScripts ()
 
 shouldIncludeStyles ()
 

Public Attributes

const INHERIT_VALUE = -1
 

Protected Attributes

 $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)
 Expand a string of the form jquery.foo,bar|jquery.ui.baz,quux to an array of module names like [ 'jquery.foo', 'jquery.bar', 'jquery.ui.baz', 'jquery.ui.quux' ]. More...
 
static newDummyContext ()
 Return a dummy ResourceLoaderContext object suitable for passing into things that don't "really" need a context. More...
 

Detailed Description

Allows changing specific properties of a context object, without changing the main one.

Inspired by DerivativeContext.

Since
1.24

Definition at line 30 of file DerivativeResourceLoaderContext.php.

Constructor & Destructor Documentation

DerivativeResourceLoaderContext::__construct ( ResourceLoaderContext  $context)

Definition at line 48 of file DerivativeResourceLoaderContext.php.

References $context.

Member Function Documentation

DerivativeResourceLoaderContext::getDebug ( )

Definition at line 132 of file DerivativeResourceLoaderContext.php.

References $debug.

DerivativeResourceLoaderContext::getDirection ( )

Definition at line 83 of file DerivativeResourceLoaderContext.php.

References $direction, Language\factory(), and getLanguage().

DerivativeResourceLoaderContext::getLanguage ( )

Definition at line 66 of file DerivativeResourceLoaderContext.php.

References $language.

Referenced by getDirection().

DerivativeResourceLoaderContext::getModules ( )

Definition at line 52 of file DerivativeResourceLoaderContext.php.

References $modules.

DerivativeResourceLoaderContext::getOnly ( )

Definition at line 147 of file DerivativeResourceLoaderContext.php.

References $only.

DerivativeResourceLoaderContext::getRaw ( )

Definition at line 177 of file DerivativeResourceLoaderContext.php.

References $raw.

DerivativeResourceLoaderContext::getRequest ( )

Definition at line 191 of file DerivativeResourceLoaderContext.php.

DerivativeResourceLoaderContext::getResourceLoader ( )

Definition at line 195 of file DerivativeResourceLoaderContext.php.

DerivativeResourceLoaderContext::getSkin ( )

Definition at line 101 of file DerivativeResourceLoaderContext.php.

References $skin, and skin().

DerivativeResourceLoaderContext::getUser ( )

Definition at line 116 of file DerivativeResourceLoaderContext.php.

References $user, and user.

DerivativeResourceLoaderContext::getVersion ( )

Definition at line 162 of file DerivativeResourceLoaderContext.php.

References $version, and version.

DerivativeResourceLoaderContext::setDebug (   $debug)
Parameters
bool$debug

Definition at line 142 of file DerivativeResourceLoaderContext.php.

References $debug.

DerivativeResourceLoaderContext::setDirection (   $direction)
Parameters
string$direction

Definition at line 96 of file DerivativeResourceLoaderContext.php.

References $direction.

DerivativeResourceLoaderContext::setLanguage (   $language)
Parameters
string$language

Definition at line 76 of file DerivativeResourceLoaderContext.php.

References $language.

DerivativeResourceLoaderContext::setModules ( array  $modules)
Parameters
string[]$modules

Definition at line 62 of file DerivativeResourceLoaderContext.php.

References $modules.

DerivativeResourceLoaderContext::setOnly (   $only)
Parameters
string | null$only

Definition at line 157 of file DerivativeResourceLoaderContext.php.

References $only.

DerivativeResourceLoaderContext::setRaw (   $raw)
Parameters
bool$raw

Definition at line 187 of file DerivativeResourceLoaderContext.php.

References $raw.

DerivativeResourceLoaderContext::setSkin (   $skin)
Parameters
string$skin

Definition at line 111 of file DerivativeResourceLoaderContext.php.

References $skin, and skin().

DerivativeResourceLoaderContext::setUser (   $user)
Parameters
string | null$user

Definition at line 126 of file DerivativeResourceLoaderContext.php.

References $user, and user.

DerivativeResourceLoaderContext::setVersion (   $version)
Parameters
string | null$version

Definition at line 172 of file DerivativeResourceLoaderContext.php.

References $version, and version.

Member Data Documentation

ResourceLoaderContext DerivativeResourceLoaderContext::$context
private

Definition at line 36 of file DerivativeResourceLoaderContext.php.

Referenced by __construct().

DerivativeResourceLoaderContext::$debug = self::INHERIT_VALUE
protected

Definition at line 43 of file DerivativeResourceLoaderContext.php.

Referenced by getDebug(), and setDebug().

DerivativeResourceLoaderContext::$direction = self::INHERIT_VALUE
protected

Definition at line 40 of file DerivativeResourceLoaderContext.php.

Referenced by getDirection(), and setDirection().

DerivativeResourceLoaderContext::$language = self::INHERIT_VALUE
protected

Definition at line 39 of file DerivativeResourceLoaderContext.php.

Referenced by getLanguage(), and setLanguage().

DerivativeResourceLoaderContext::$modules = self::INHERIT_VALUE
protected

Definition at line 38 of file DerivativeResourceLoaderContext.php.

Referenced by getModules(), and setModules().

DerivativeResourceLoaderContext::$only = self::INHERIT_VALUE
protected

Definition at line 44 of file DerivativeResourceLoaderContext.php.

Referenced by getOnly(), and setOnly().

DerivativeResourceLoaderContext::$raw = self::INHERIT_VALUE
protected

Definition at line 46 of file DerivativeResourceLoaderContext.php.

Referenced by getRaw(), and setRaw().

DerivativeResourceLoaderContext::$skin = self::INHERIT_VALUE
protected

Definition at line 41 of file DerivativeResourceLoaderContext.php.

Referenced by getSkin(), and setSkin().

DerivativeResourceLoaderContext::$user = self::INHERIT_VALUE
protected

Definition at line 42 of file DerivativeResourceLoaderContext.php.

Referenced by getUser(), and setUser().

DerivativeResourceLoaderContext::$version = self::INHERIT_VALUE
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.


The documentation for this class was generated from the following file: