MediaWiki  1.23.2
ResourceLoaderContext Class Reference

Object passed around to modules which contains information about the state of a specific loader request. More...

Public Member Functions

 __construct ( $resourceLoader, WebRequest $request)
 
 getDebug ()
 
 getDirection ()
 
 getHash ()
 
 getLanguage ()
 
 getModules ()
 
 getOnly ()
 
 getRaw ()
 
 getRequest ()
 
 getResourceLoader ()
 
 getSkin ()
 
 getUser ()
 
 getVersion ()
 
 shouldIncludeMessages ()
 
 shouldIncludeScripts ()
 
 shouldIncludeStyles ()
 

Static Public Member Functions

static expandModuleNames ( $modules)
 Expand a string of the form jquery.foo,bar|jquery.ui.baz,quux to an array of module names like array( '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...
 

Protected Attributes

 $debug
 
 $direction
 
 $hash
 
 $language
 
 $modules
 
 $only
 
 $raw
 
 $request
 
 $resourceLoader
 
 $skin
 
 $user
 
 $version
 

Detailed Description

Object passed around to modules which contains information about the state of a specific loader request.

Definition at line 29 of file ResourceLoaderContext.php.

Constructor & Destructor Documentation

◆ __construct()

ResourceLoaderContext::__construct (   $resourceLoader,
WebRequest  $request 
)

Member Function Documentation

◆ expandModuleNames()

static ResourceLoaderContext::expandModuleNames (   $modules)
static

Expand a string of the form jquery.foo,bar|jquery.ui.baz,quux to an array of module names like array( 'jquery.foo', 'jquery.bar', 'jquery.ui.baz', 'jquery.ui.quux' )

Parameters
string$modulesPacked module name list
Returns
array of module names

Definition at line 84 of file ResourceLoaderContext.php.

References $modules, $retval, array(), and as.

Referenced by __construct(), and ResourceLoaderTest\testexpandModuleNames().

◆ getDebug()

◆ getDirection()

ResourceLoaderContext::getDirection ( )
Returns
string

Definition at line 154 of file ResourceLoaderContext.php.

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

Referenced by getHash().

◆ getHash()

◆ getLanguage()

◆ getModules()

ResourceLoaderContext::getModules ( )
Returns
array

Definition at line 136 of file ResourceLoaderContext.php.

References $modules.

Referenced by ResourceFileCache\newFromContext().

◆ getOnly()

ResourceLoaderContext::getOnly ( )

◆ getRaw()

ResourceLoaderContext::getRaw ( )
Returns
bool

Definition at line 203 of file ResourceLoaderContext.php.

References $raw.

Referenced by ResourceLoader\makeModuleResponse().

◆ getRequest()

◆ getResourceLoader()

◆ getSkin()

◆ getUser()

◆ getVersion()

◆ newDummyContext()

static ResourceLoaderContext::newDummyContext ( )
static

Return a dummy ResourceLoaderContext object suitable for passing into things that don't "really" need a context.

Returns
ResourceLoaderContext

Definition at line 115 of file ResourceLoaderContext.php.

References array().

◆ shouldIncludeMessages()

ResourceLoaderContext::shouldIncludeMessages ( )
Returns
bool

Definition at line 224 of file ResourceLoaderContext.php.

References only.

Referenced by ResourceLoader\makeModuleResponse().

◆ shouldIncludeScripts()

ResourceLoaderContext::shouldIncludeScripts ( )
Returns
bool

Definition at line 210 of file ResourceLoaderContext.php.

References only.

Referenced by ResourceLoader\makeModuleResponse().

◆ shouldIncludeStyles()

ResourceLoaderContext::shouldIncludeStyles ( )
Returns
bool

Definition at line 217 of file ResourceLoaderContext.php.

References only.

Referenced by ResourceLoader\makeModuleResponse().

Member Data Documentation

◆ $debug

ResourceLoaderContext::$debug
protected

Definition at line 40 of file ResourceLoaderContext.php.

Referenced by getDebug().

◆ $direction

ResourceLoaderContext::$direction
protected

Definition at line 37 of file ResourceLoaderContext.php.

Referenced by getDirection().

◆ $hash

ResourceLoaderContext::$hash
protected

Definition at line 43 of file ResourceLoaderContext.php.

Referenced by getHash().

◆ $language

ResourceLoaderContext::$language
protected

Definition at line 36 of file ResourceLoaderContext.php.

Referenced by getLanguage().

◆ $modules

ResourceLoaderContext::$modules
protected

Definition at line 35 of file ResourceLoaderContext.php.

Referenced by __construct(), expandModuleNames(), and getModules().

◆ $only

ResourceLoaderContext::$only
protected

Definition at line 41 of file ResourceLoaderContext.php.

Referenced by getOnly().

◆ $raw

ResourceLoaderContext::$raw
protected

Definition at line 44 of file ResourceLoaderContext.php.

Referenced by getRaw().

◆ $request

ResourceLoaderContext::$request
protected

Definition at line 34 of file ResourceLoaderContext.php.

Referenced by __construct(), and getRequest().

◆ $resourceLoader

ResourceLoaderContext::$resourceLoader
protected

Definition at line 33 of file ResourceLoaderContext.php.

Referenced by __construct(), and getResourceLoader().

◆ $skin

ResourceLoaderContext::$skin
protected

Definition at line 38 of file ResourceLoaderContext.php.

Referenced by getSkin().

◆ $user

ResourceLoaderContext::$user
protected

Definition at line 39 of file ResourceLoaderContext.php.

Referenced by getUser().

◆ $version

ResourceLoaderContext::$version
protected

Definition at line 42 of file ResourceLoaderContext.php.

Referenced by getVersion().


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