MediaWiki  REL1_24
ResourceLoaderStartUpModule Class Reference
Inheritance diagram for ResourceLoaderStartUpModule:
Collaboration diagram for ResourceLoaderStartUpModule:

List of all members.

Public Member Functions

 getGroup ()
 getModifiedHash (ResourceLoaderContext $context)
 Hash of all dynamic data embedded in getScript().
 getModifiedTime (ResourceLoaderContext $context)
 getModuleRegistrations (ResourceLoaderContext $context)
 Get registration code for all modules.
 getScript (ResourceLoaderContext $context)
 isRaw ()
 supportsURLLoading ()

Static Public Member Functions

static compileUnresolvedDependencies (array &$registryData)
 Optimize the dependency tree in $this->modules and return it.
static getStartupModules ()
 Base modules required for the the base environment of ResourceLoader.
static getStartupModulesUrl (ResourceLoaderContext $context)
 Get the load URL of the startup modules.

Protected Member Functions

 getConfigSettings ($context)

Static Protected Member Functions

static getImplicitDependencies (array $registryData, $moduleName)
 Recursively get all explicit and implicit dependencies for to the given module.

Protected Attributes

 $configVars = array()
 $modifiedTime = array()
 $targets = array( 'desktop', 'mobile' )

Detailed Description

Definition at line 25 of file ResourceLoaderStartUpModule.php.


Member Function Documentation

Optimize the dependency tree in $this->modules and return it.

The optimization basically works like this: Given we have module A with the dependencies B and C and module B with the dependency C. Now we don't have to tell the client to explicitly fetch module C as that's already included in module B.

This way we can reasonably reduce the amout of module registration data send to the client.

Parameters:
array&$registryDataModules keyed by name with properties:
  • string 'version'
  • array 'dependencies'
  • string|null 'group'
  • string 'source'
  • string|false 'loader'

Definition at line 171 of file ResourceLoaderStartUpModule.php.

References ResourceLoaderModule\$name, as, and getImplicitDependencies().

Referenced by getModuleRegistrations().

Returns:
string

Reimplemented from ResourceLoaderModule.

Definition at line 476 of file ResourceLoaderStartUpModule.php.

static ResourceLoaderStartUpModule::getImplicitDependencies ( array registryData,
moduleName 
) [static, protected]

Recursively get all explicit and implicit dependencies for to the given module.

Parameters:
array$registryData
string$moduleName
Returns:
array

Definition at line 125 of file ResourceLoaderStartUpModule.php.

References array(), and as.

Referenced by compileUnresolvedDependencies().

Hash of all dynamic data embedded in getScript().

Detect changes to mw.config settings embedded in getScript (bug 28899).

Parameters:
ResourceLoaderContext$context
Returns:
string Hash

Reimplemented from ResourceLoaderModule.

Definition at line 464 of file ResourceLoaderStartUpModule.php.

References array(), ResourceLoaderModule\getConfig(), and getConfigSettings().

Base modules required for the the base environment of ResourceLoader.

Returns:
array

Definition at line 340 of file ResourceLoaderStartUpModule.php.

References array().

Referenced by getStartupModulesUrl().

Get the load URL of the startup modules.

This is a helper for getScript(), but can also be called standalone, such as when generating an AppCache manifest.

Parameters:
ResourceLoaderContext$context
Returns:
string

Definition at line 353 of file ResourceLoaderStartUpModule.php.

References $query, array(), as, ResourceLoaderContext\getDebug(), ResourceLoaderContext\getLanguage(), ResourceLoaderContext\getResourceLoader(), ResourceLoaderContext\getSkin(), getStartupModules(), ResourceLoader\makePackedModulesString(), wfAppendQuery(), wfScript(), and wfTimestamp().

Returns:
bool

Reimplemented from ResourceLoaderModule.

Definition at line 331 of file ResourceLoaderStartUpModule.php.

Returns:
bool

Reimplemented from ResourceLoaderModule.

Definition at line 413 of file ResourceLoaderStartUpModule.php.


Member Data Documentation

ResourceLoaderStartUpModule::$configVars = array() [protected]

Definition at line 30 of file ResourceLoaderStartUpModule.php.

ResourceLoaderStartUpModule::$modifiedTime = array() [protected]

Definition at line 29 of file ResourceLoaderStartUpModule.php.

ResourceLoaderStartUpModule::$targets = array( 'desktop', 'mobile' ) [protected]

Reimplemented from ResourceLoaderModule.

Definition at line 31 of file ResourceLoaderStartUpModule.php.


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