BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
ResourceLoaderContext Class Reference
Inheritance diagram for ResourceLoaderContext:

Public Member Functions

 __construct (ResourceLoader $resourceLoader, WebRequest $request)
 
 getResourceLoader ()
 
 getRequest ()
 
 getLogger ()
 
 getModules ()
 
 getLanguage ()
 
 getDirection ()
 
 getSkin ()
 
 getUser ()
 
 msg ()
 
 getUserObj ()
 
 getDebug ()
 
 getOnly ()
 
 getVersion ()
 
 getRaw ()
 
 getImage ()
 
 getVariant ()
 
 getFormat ()
 
 getImageObj ()
 
 shouldIncludeScripts ()
 
 shouldIncludeStyles ()
 
 shouldIncludeMessages ()
 
 getHash ()
 

Static Public Member Functions

static expandModuleNames ($modules)
 
static newDummyContext ()
 

Protected Attributes

 $resourceLoader
 
 $request
 
 $logger
 
 $skin
 
 $language
 
 $debug
 
 $user
 
 $modules
 
 $only
 
 $version
 
 $raw
 
 $image
 
 $variant
 
 $format
 
 $direction
 
 $hash
 
 $userObj
 
 $imageObj
 

Detailed Description

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

Constructor & Destructor Documentation

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

Member Function Documentation

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 Array of module names
ResourceLoaderContext::getDebug ( )
Returns
bool
ResourceLoaderContext::getDirection ( )
Returns
string
ResourceLoaderContext::getFormat ( )
Returns
string|null
ResourceLoaderContext::getHash ( )

All factors that uniquely identify this request, except 'modules'.

The list of modules is excluded here for legacy reasons as most callers already split up handling of individual modules. Including it here would massively fragment the cache and decrease its usefulness.

E.g. Used by RequestFileCache to form a cache key for storing the reponse output.

Returns
string
ResourceLoaderContext::getImage ( )
Returns
string|null
ResourceLoaderContext::getImageObj ( )

If this is a request for an image, get the ResourceLoaderImage object.

Since
1.25
Returns
ResourceLoaderImage|bool false if a valid object cannot be created
ResourceLoaderContext::getLanguage ( )
Returns
string
ResourceLoaderContext::getLogger ( )
Since
1.27
Returns
ResourceLoaderContext::getModules ( )
Returns
array
ResourceLoaderContext::getOnly ( )
Returns
string|null
ResourceLoaderContext::getRaw ( )
Returns
bool
ResourceLoaderContext::getRequest ( )
Returns
WebRequest
ResourceLoaderContext::getResourceLoader ( )
ResourceLoaderContext::getSkin ( )
Returns
string
ResourceLoaderContext::getUser ( )
Returns
string|null
ResourceLoaderContext::getUserObj ( )

Get the possibly-cached User object for the specified username

Since
1.25
Returns
User|bool false if a valid object cannot be created
ResourceLoaderContext::getVariant ( )
Returns
string|null
ResourceLoaderContext::getVersion ( )
ResourceLoaderContext::msg ( )

Get a Message object with context set. See wfMessage for parameters.

Since
1.27
Parameters
mixed...
Returns
Message
static ResourceLoaderContext::newDummyContext ( )
static

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

Returns
ResourceLoaderContext
ResourceLoaderContext::shouldIncludeMessages ( )
Returns
bool
ResourceLoaderContext::shouldIncludeScripts ( )
Returns
bool
ResourceLoaderContext::shouldIncludeStyles ( )
Returns
bool

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