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

Public Member Functions

 getGroup ()
 
 getModifiedHash (ResourceLoaderContext $context)
 Hash of all dynamic data embedded in getScript(). More...
 
 getModifiedTime (ResourceLoaderContext $context)
 
 getScript (ResourceLoaderContext $context)
 
 isRaw ()
 
 supportsURLLoading ()
 
- Public Member Functions inherited from ResourceLoaderModule
 getDefinitionMtime (ResourceLoaderContext $context)
 Helper method for calculating when this module's definition summary was last changed. More...
 
 getDefinitionSummary (ResourceLoaderContext $context)
 Get the definition summary for this module. More...
 
 getDependencies ()
 Get a list of modules this module depends on. More...
 
 getFileDependencies ( $skin)
 Get the files this module depends on indirectly for a given skin. More...
 
 getFlip ( $context)
 
 getHashMtime (ResourceLoaderContext $context)
 Helper method for calculating when the module's hash (if it has one) changed. More...
 
 getLoaderScript ()
 Get the loader JS for this module, if set. More...
 
 getMessages ()
 Get the messages needed for this module. More...
 
 getMsgBlobMtime ( $lang)
 Get the last modification timestamp of the message blob for this module in a given language. More...
 
 getName ()
 Get this module's name. More...
 
 getOrigin ()
 Get this module's origin. More...
 
 getPosition ()
 Where on the HTML page should this module's JS be loaded? More...
 
 getScriptURLsForDebug (ResourceLoaderContext $context)
 Get the URL or URLs to load for this module's JS in debug mode. More...
 
 getSource ()
 Get the origin of this module. More...
 
 getStyles (ResourceLoaderContext $context)
 Get all CSS for this module for a given skin. More...
 
 getStyleURLsForDebug (ResourceLoaderContext $context)
 Get the URL or URLs to load for this module's CSS in debug mode. More...
 
 getTargets ()
 Get target(s) for the module, eg ['desktop'] or ['desktop', 'mobile']. More...
 
 isKnownEmpty (ResourceLoaderContext $context)
 Check whether this module is known to be empty. More...
 
 setFileDependencies ( $skin, $deps)
 Set preloaded file dependency information. More...
 
 setMsgBlobMtime ( $lang, $mtime)
 Set a preloaded message blob last modification timestamp. More...
 
 setName ( $name)
 Set this module's name. More...
 
 setOrigin ( $origin)
 Set this module's origin. More...
 

Static Public Member Functions

static getModuleRegistrations (ResourceLoaderContext $context)
 Get registration code for all modules. More...
 
static getStartupModulesUrl (ResourceLoaderContext $context)
 Get the load URL of the startup modules. More...
 

Protected Member Functions

 getConfig ( $context)
 
- Protected Member Functions inherited from ResourceLoaderModule
 validateScriptFile ( $fileName, $contents)
 Validate a given script file; if valid returns the original source. More...
 

Protected Attributes

 $configVars = array()
 
 $modifiedTime = array()
 
 $targets = array( 'desktop', 'mobile' )
 
- Protected Attributes inherited from ResourceLoaderModule
 $fileDeps = array()
 
 $msgBlobMtime = array()
 
 $name = null
 
 $origin = self::ORIGIN_CORE_SITEWIDE
 
 $targets = array( 'desktop' )
 

Additional Inherited Members

- Public Attributes inherited from ResourceLoaderModule
const ORIGIN_ALL = 10
 
const ORIGIN_CORE_INDIVIDUAL = 2
 
const ORIGIN_CORE_SITEWIDE = 1
 
const ORIGIN_USER_INDIVIDUAL = 4
 
const ORIGIN_USER_SITEWIDE = 3
 
const TYPE_COMBINED = 'combined'
 
const TYPE_MESSAGES = 'messages'
 
const TYPE_SCRIPTS = 'scripts'
 
const TYPE_STYLES = 'styles'
 
- Static Protected Member Functions inherited from ResourceLoaderModule
static javaScriptParser ()
 
static safeFilemtime ( $filename)
 Safe version of filemtime(), which doesn't throw a PHP warning if the file doesn't exist but returns 1 instead. More...
 

Detailed Description

Definition at line 25 of file ResourceLoaderStartUpModule.php.

Member Function Documentation

◆ getConfig()

◆ getGroup()

ResourceLoaderStartUpModule::getGroup ( )
Returns
string

Reimplemented from ResourceLoaderModule.

Definition at line 365 of file ResourceLoaderStartUpModule.php.

◆ getModifiedHash()

ResourceLoaderStartUpModule::getModifiedHash ( ResourceLoaderContext  $context)

Hash of all dynamic data embedded in getScript().

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

Parameters
$contextResourceLoaderContext
Returns
string: Hash

Reimplemented from ResourceLoaderModule.

Definition at line 351 of file ResourceLoaderStartUpModule.php.

References array(), getConfig(), and global.

◆ getModifiedTime()

ResourceLoaderStartUpModule::getModifiedTime ( ResourceLoaderContext  $context)

◆ getModuleRegistrations()

static ResourceLoaderStartUpModule::getModuleRegistrations ( ResourceLoaderContext  $context)
static

◆ getScript()

ResourceLoaderStartUpModule::getScript ( ResourceLoaderContext  $context)

◆ getStartupModulesUrl()

static ResourceLoaderStartUpModule::getStartupModulesUrl ( ResourceLoaderContext  $context)
static

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 238 of file ResourceLoaderStartUpModule.php.

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

◆ isRaw()

ResourceLoaderStartUpModule::isRaw ( )
Returns
bool

Reimplemented from ResourceLoaderModule.

Definition at line 225 of file ResourceLoaderStartUpModule.php.

◆ supportsURLLoading()

ResourceLoaderStartUpModule::supportsURLLoading ( )
Returns
bool

Reimplemented from ResourceLoaderModule.

Definition at line 300 of file ResourceLoaderStartUpModule.php.

Member Data Documentation

◆ $configVars

ResourceLoaderStartUpModule::$configVars = array()
protected

Definition at line 30 of file ResourceLoaderStartUpModule.php.

◆ $modifiedTime

ResourceLoaderStartUpModule::$modifiedTime = array()
protected

Definition at line 29 of file ResourceLoaderStartUpModule.php.

◆ $targets

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

Definition at line 31 of file ResourceLoaderStartUpModule.php.


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