MediaWiki  master
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)
 
 getContentOverrideCallback ()
 
 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 ()
 
 getContentOverrideCallback ()
 Return the replaced-content mapping callback. More...
 
 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 ()
 
 getReqBase ()
 Get the request base parameters, omitting any defaults. More...
 
 getRequest ()
 
 getResourceLoader ()
 
 getSkin ()
 
 getUser ()
 
 getUserObj ()
 Get the possibly-cached User object for the specified username. More...
 
 getVariant ()
 
 getVersion ()
 
 msg ( $key)
 Get a Message object with context set. More...
 
 shouldIncludeMessages ()
 
 shouldIncludeScripts ()
 
 shouldIncludeStyles ()
 

Public Attributes

const INHERIT_VALUE = -1
 
- Public Attributes inherited from ResourceLoaderContext
const DEFAULT_LANG = 'qqx'
 
const DEFAULT_SKIN = 'fallback'
 

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(). 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

◆ __construct()

DerivativeResourceLoaderContext::__construct ( ResourceLoaderContext  $context)

Definition at line 49 of file DerivativeResourceLoaderContext.php.

References $context.

Member Function Documentation

◆ getContentOverrideCallback()

DerivativeResourceLoaderContext::getContentOverrideCallback ( )

Definition at line 200 of file DerivativeResourceLoaderContext.php.

References $contentOverrideCallback.

◆ getDebug()

DerivativeResourceLoaderContext::getDebug ( )

Definition at line 133 of file DerivativeResourceLoaderContext.php.

References $debug.

◆ getDirection()

DerivativeResourceLoaderContext::getDirection ( )

◆ getLanguage()

DerivativeResourceLoaderContext::getLanguage ( )

Definition at line 67 of file DerivativeResourceLoaderContext.php.

References $language.

Referenced by getDirection().

◆ getModules()

DerivativeResourceLoaderContext::getModules ( )

Definition at line 53 of file DerivativeResourceLoaderContext.php.

References $modules.

◆ getOnly()

DerivativeResourceLoaderContext::getOnly ( )

Definition at line 148 of file DerivativeResourceLoaderContext.php.

References $only.

◆ getRaw()

DerivativeResourceLoaderContext::getRaw ( )

Definition at line 178 of file DerivativeResourceLoaderContext.php.

References $raw.

◆ getRequest()

DerivativeResourceLoaderContext::getRequest ( )

Definition at line 192 of file DerivativeResourceLoaderContext.php.

◆ getResourceLoader()

DerivativeResourceLoaderContext::getResourceLoader ( )

Definition at line 196 of file DerivativeResourceLoaderContext.php.

◆ getSkin()

DerivativeResourceLoaderContext::getSkin ( )

Definition at line 102 of file DerivativeResourceLoaderContext.php.

References $skin.

◆ getUser()

DerivativeResourceLoaderContext::getUser ( )

Definition at line 117 of file DerivativeResourceLoaderContext.php.

References $user, and user.

◆ getVersion()

DerivativeResourceLoaderContext::getVersion ( )

Definition at line 163 of file DerivativeResourceLoaderContext.php.

References $version, and version.

◆ setContentOverrideCallback()

DerivativeResourceLoaderContext::setContentOverrideCallback (   $callback)
See also
self::getContentOverrideCallback
Since
1.32
Parameters
callable | null | int$callbackAs per self::getContentOverrideCallback, or self::INHERIT_VALUE

Definition at line 213 of file DerivativeResourceLoaderContext.php.

◆ setDebug()

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

Definition at line 143 of file DerivativeResourceLoaderContext.php.

References $debug, and null.

◆ setDirection()

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

Definition at line 97 of file DerivativeResourceLoaderContext.php.

References $direction, and null.

◆ setLanguage()

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

Definition at line 77 of file DerivativeResourceLoaderContext.php.

References $language, and null.

◆ setModules()

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

Definition at line 63 of file DerivativeResourceLoaderContext.php.

References $modules.

◆ setOnly()

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

Definition at line 158 of file DerivativeResourceLoaderContext.php.

References $only, and null.

◆ setRaw()

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

Definition at line 188 of file DerivativeResourceLoaderContext.php.

References $raw.

◆ setSkin()

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

Definition at line 112 of file DerivativeResourceLoaderContext.php.

References $skin, and null.

◆ setUser()

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

Definition at line 127 of file DerivativeResourceLoaderContext.php.

References $user, null, and user.

◆ setVersion()

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

Definition at line 173 of file DerivativeResourceLoaderContext.php.

References $version, null, and version.

Member Data Documentation

◆ $contentOverrideCallback

DerivativeResourceLoaderContext::$contentOverrideCallback = self::INHERIT_VALUE
protected

Definition at line 47 of file DerivativeResourceLoaderContext.php.

Referenced by getContentOverrideCallback().

◆ $context

ResourceLoaderContext DerivativeResourceLoaderContext::$context
private

Definition at line 36 of file DerivativeResourceLoaderContext.php.

Referenced by __construct().

◆ $debug

DerivativeResourceLoaderContext::$debug = self::INHERIT_VALUE
protected

Definition at line 43 of file DerivativeResourceLoaderContext.php.

Referenced by getDebug(), and setDebug().

◆ $direction

DerivativeResourceLoaderContext::$direction = self::INHERIT_VALUE
protected

Definition at line 40 of file DerivativeResourceLoaderContext.php.

Referenced by getDirection(), and setDirection().

◆ $language

DerivativeResourceLoaderContext::$language = self::INHERIT_VALUE
protected

Definition at line 39 of file DerivativeResourceLoaderContext.php.

Referenced by getLanguage(), and setLanguage().

◆ $modules

DerivativeResourceLoaderContext::$modules = self::INHERIT_VALUE
protected

Definition at line 38 of file DerivativeResourceLoaderContext.php.

Referenced by getModules(), and setModules().

◆ $only

DerivativeResourceLoaderContext::$only = self::INHERIT_VALUE
protected

Definition at line 44 of file DerivativeResourceLoaderContext.php.

Referenced by getOnly(), and setOnly().

◆ $raw

DerivativeResourceLoaderContext::$raw = self::INHERIT_VALUE
protected

Definition at line 46 of file DerivativeResourceLoaderContext.php.

Referenced by getRaw(), and setRaw().

◆ $skin

DerivativeResourceLoaderContext::$skin = self::INHERIT_VALUE
protected

Definition at line 41 of file DerivativeResourceLoaderContext.php.

Referenced by getSkin(), and setSkin().

◆ $user

DerivativeResourceLoaderContext::$user = self::INHERIT_VALUE
protected

Definition at line 42 of file DerivativeResourceLoaderContext.php.

Referenced by getUser(), and setUser().

◆ $version

DerivativeResourceLoaderContext::$version = self::INHERIT_VALUE
protected

Definition at line 45 of file DerivativeResourceLoaderContext.php.

Referenced by getVersion(), and setVersion().

◆ INHERIT_VALUE

const DerivativeResourceLoaderContext::INHERIT_VALUE = -1

Definition at line 31 of file DerivativeResourceLoaderContext.php.


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