MediaWiki REL1_37
|
Abstraction for ResourceLoader modules, with name registration and maxage functionality. More...
Public Member Functions | |
enableModuleContentVersion () | |
Whether to generate version hash based on module content. | |
getConfig () | |
getDefinitionSummary (ResourceLoaderContext $context) | |
Get the definition summary for this module. | |
getDependencies (ResourceLoaderContext $context=null) | |
Get a list of modules this module depends on. | |
getDeprecationInformation (ResourceLoaderContext $context) | |
Get JS representing deprecation information for the current module if available. | |
getFlip (ResourceLoaderContext $context) | |
getGroup () | |
Get the group this module is in. | |
getHeaders (ResourceLoaderContext $context) | |
Get headers to send as part of a module web response. | |
getMessages () | |
Get the messages needed for this module. | |
getModuleContent (ResourceLoaderContext $context) | |
Get an array of this module's resources. | |
getName () | |
Get this module's name. | |
getOrigin () | |
Get this module's origin. | |
getScript (ResourceLoaderContext $context) | |
Get all JS for this module for a given language and skin. | |
getScriptURLsForDebug (ResourceLoaderContext $context) | |
Get the URL or URLs to load for this module's JS in debug mode. | |
getSkipFunction () | |
Get the skip function. | |
getSource () | |
Get the source of this module. | |
getStyles (ResourceLoaderContext $context) | |
Get all CSS for this module for a given skin. | |
getStyleURLsForDebug (ResourceLoaderContext $context) | |
Get the URL or URLs to load for this module's CSS in debug mode. | |
getTargets () | |
Get target(s) for the module, eg ['desktop'] or ['desktop', 'mobile']. | |
getTemplates () | |
Takes named templates by the module and returns an array mapping. | |
getType () | |
Get the module's load type. | |
getVersionHash (ResourceLoaderContext $context) | |
Get a string identifying the current version of this module in a given context. | |
isKnownEmpty (ResourceLoaderContext $context) | |
Check whether this module is known to be empty. | |
requiresES6 () | |
Whether the module requires ES6 support in the client. | |
setConfig (Config $config) | |
setDependencyAccessCallbacks (callable $loadCallback, callable $saveCallback) | |
Inject the functions that load/save the indirect file path dependency list from storage. | |
setFileDependencies (ResourceLoaderContext $context, array $paths) | |
Set the indirect dependencies for this module persuant to the skin/language context. | |
setHookContainer (HookContainer $hookContainer) | |
setLogger (LoggerInterface $logger) | |
setMessageBlob ( $blob, $lang) | |
Set in-object cache for message blobs. | |
setName ( $name) | |
Set this module's name. | |
setSkinStylesOverride (array $moduleSkinStyles) | |
Provide overrides for skinStyles to modules that support that. | |
shouldEmbedModule (ResourceLoaderContext $context) | |
Check whether this module should be embeded rather than linked. | |
supportsURLLoading () | |
Whether this module supports URL loading. | |
Static Public Member Functions | |
static | expandRelativePaths (array $filePaths) |
Expand directories relative to $IP. | |
static | getRelativePaths (array $filePaths) |
Make file paths relative to MediaWiki directory. | |
static | getVary (ResourceLoaderContext $context) |
Get vary string. | |
Protected Member Functions | |
buildContent (ResourceLoaderContext $context) | |
Bundle all resources attached to this module into an array. | |
getFileDependencies (ResourceLoaderContext $context) | |
Get the indirect dependencies for this module persuant to the skin/language context. | |
getHookRunner () | |
Get a HookRunner for running core hooks. | |
getLessVars (ResourceLoaderContext $context) | |
Get module-specific LESS variables, if any. | |
getLogger () | |
getMessageBlob (ResourceLoaderContext $context) | |
Get the hash of the message blob. | |
getPreloadLinks (ResourceLoaderContext $context) | |
Get a list of resources that web browsers may preload. | |
saveFileDependencies (ResourceLoaderContext $context, array $curFileRefs) | |
Save the indirect dependencies for this module persuant to the skin/language context. | |
validateScriptFile ( $fileName, $contents) | |
Validate a user-provided JavaScript blob. | |
Static Protected Member Functions | |
static | safeFileHash ( $filePath) |
Compute a non-cryptographic string hash of a file's contents. | |
Protected Attributes | |
Config | $config |
array | $contents = [] |
Map of (context hash => cached module content) | |
string bool | $deprecated = false |
Deprecation string or true if deprecated; false otherwise. | |
array | $fileDeps = [] |
Map of (variant => indirect file dependencies) | |
LoggerInterface | $logger |
array | $msgBlobs = [] |
Map of (language => in-object cache for message blob) | |
string null | $name = null |
Module name. | |
int | $origin = self::ORIGIN_CORE_SITEWIDE |
Script and style modules form a hierarchy of trustworthiness, with core modules like skins and jQuery as most trustworthy, and user scripts as least trustworthy. | |
string[] | $targets = [ 'desktop' ] |
What client platforms the module targets (e.g. | |
array | $versionHash = [] |
Map of (context hash => cached module version hash) | |
Private Attributes | |
callback | $depLoadCallback |
Function of (module name, variant) to get indirect file dependencies. | |
callback | $depSaveCallback |
Function of (module name, variant) to get indirect file dependencies. | |
HookRunner null | $hookRunner |
Abstraction for ResourceLoader modules, with name registration and maxage functionality.
Definition at line 39 of file ResourceLoaderModule.php.
|
finalprotected |
Bundle all resources attached to this module into an array.
ResourceLoaderContext | $context |
Definition at line 745 of file ResourceLoaderModule.php.
References $blob, $content, ResourceLoader\ensureNewline(), ResourceLoader\filter(), ResourceLoaderContext\getDebug(), ResourceLoaderContext\getOnly(), and ResourceLoader\makeCombinedStyles().
ResourceLoaderModule::enableModuleContentVersion | ( | ) |
Whether to generate version hash based on module content.
If a module requires database or file system access to build the module content, consider disabling this in favour of manually tracking relevant aspects in getDefinitionSummary(). See getVersionHash() for how this is used.
Reimplemented in ResourceLoaderFileModule, ResourceLoaderLanguageDataModule, ResourceLoaderStartUpModule, ResourceLoaderUserDefaultsModule, and ResourceLoaderWikiModule.
Definition at line 890 of file ResourceLoaderModule.php.
|
static |
Expand directories relative to $IP.
array | $filePaths |
Definition at line 587 of file ResourceLoaderModule.php.
Referenced by ResourceLoaderFileModule\compileLessString(), ResourceLoader\loadModuleDependenciesInternal(), and ResourceLoader\preloadModuleInfo().
ResourceLoaderModule::getConfig | ( | ) |
Definition at line 234 of file ResourceLoaderModule.php.
References $config.
Referenced by ResourceLoaderWikiModule\getContentObj(), ResourceLoaderSiteModule\getPages(), ResourceLoaderSiteStylesModule\getPages(), ResourceLoaderUserModule\getPages(), ResourceLoaderUserStylesModule\getPages(), ResourceLoaderWikiModule\getPages(), ResourceLoaderFileModule\getScriptURLsForDebug(), ResourceLoaderWikiModule\getStyles(), and ResourceLoaderFileModule\getStyleURLsForDebug().
ResourceLoaderModule::getDefinitionSummary | ( | ResourceLoaderContext | $context | ) |
Get the definition summary for this module.
This is the method subclasses are recommended to use to track data that should influence the module's version hash.
Subclasses must call the parent getDefinitionSummary() and add to the returned array. It is recommended that each subclass appends its own array, to prevent clashes or accidental overwrites of array keys from the parent class. This gives each subclass a clean scope.
Return an array that contains all significant properties that define the module. The returned data should be deterministic and only change when the generated module response would change. Prefer content hashes over modified timestamps because timestamps may change for unrelated reasons and are not deterministic (T102578). For example, because timestamps are not stored in Git, each branch checkout would cause all files to appear as new. Timestamps also tend to not match between servers causing additional ever-lasting churning of the version hash.
Be careful not to normalise the data too much in an effort to be deterministic. For example, if a module concatenates files together (order is significant), then the definition summary could be a list of file names, and a list of file hashes. These lists should not be sorted as that would mean the cache is not invalidated when the order changes (T39812).
This data structure must exclusively contain primitive "scalar" values, as it will be serialised using json_encode
.
ResourceLoaderContext | $context |
Reimplemented in ResourceLoaderFileModule, ResourceLoaderImageModule, ResourceLoaderSkinModule, and ResourceLoaderWikiModule.
Definition at line 937 of file ResourceLoaderModule.php.
ResourceLoaderModule::getDependencies | ( | ResourceLoaderContext | $context = null | ) |
Get a list of modules this module depends on.
Dependency information is taken into account when loading a module on the client side.
Note: It is expected that $context will be made non-optional in the near future.
ResourceLoaderContext | null | $context |
Reimplemented in ResourceLoaderFileModule, ResourceLoaderForeignApiModule, ResourceLoaderSiteModule, and ResourceLoaderUserOptionsModule.
Definition at line 417 of file ResourceLoaderModule.php.
Referenced by ResourceLoaderWikiModule\isKnownEmpty().
ResourceLoaderModule::getDeprecationInformation | ( | ResourceLoaderContext | $context | ) |
Get JS representing deprecation information for the current module if available.
ResourceLoaderContext | $context |
Definition at line 180 of file ResourceLoaderModule.php.
References $deprecated, $name, ResourceLoaderContext\encodeJson(), and getName().
Referenced by ResourceLoaderFileModule\getScript().
|
protected |
Get the indirect dependencies for this module persuant to the skin/language context.
These are only image files referenced by the module's stylesheet
If niether setFileDependencies() nor setDependencyLoadCallback() was called, this will simply return a placeholder with an empty file list
ResourceLoaderContext | $context |
RuntimeException | When setFileDependencies() has not yet been called |
Definition at line 491 of file ResourceLoaderModule.php.
Referenced by ResourceLoaderFileModule\getFileHashes().
ResourceLoaderModule::getFlip | ( | ResourceLoaderContext | $context | ) |
ResourceLoaderContext | $context |
Reimplemented in ResourceLoaderFileModule.
Definition at line 169 of file ResourceLoaderModule.php.
References ResourceLoaderContext\getDirection().
Referenced by ResourceLoaderWikiModule\getStyles().
ResourceLoaderModule::getGroup | ( | ) |
Get the group this module is in.
Reimplemented in ResourceLoaderFileModule, ResourceLoaderSiteStylesModule, ResourceLoaderUserModule, ResourceLoaderUserOptionsModule, ResourceLoaderUserStylesModule, and ResourceLoaderWikiModule.
Definition at line 388 of file ResourceLoaderModule.php.
|
final |
Get headers to send as part of a module web response.
It is not supported to send headers through this method that are required to be unique or otherwise sent once in an HTTP response because clients may make batch requests for multiple modules (as is the default behaviour for ResourceLoader clients).
For exclusive or aggregated headers, see ResourceLoader::sendResponseHeaders().
ResourceLoaderContext | $context |
Definition at line 646 of file ResourceLoaderModule.php.
|
protected |
Get a HookRunner for running core hooks.
Definition at line 284 of file ResourceLoaderModule.php.
Referenced by ResourceLoaderForeignApiModule\getDependencies(), ResourceLoaderSiteModule\getPages(), and ResourceLoaderSiteStylesModule\getPages().
|
protected |
Get module-specific LESS variables, if any.
ResourceLoaderContext | $context |
Reimplemented in ResourceLoaderLessVarFileModule, and ResourceLoaderSkinModule.
Definition at line 717 of file ResourceLoaderModule.php.
Referenced by ResourceLoaderFileModule\getDefinitionSummary().
|
protected |
Definition at line 262 of file ResourceLoaderModule.php.
References $logger.
Referenced by ResourceLoaderWikiModule\getContentObj().
|
protected |
Get the hash of the message blob.
ResourceLoaderContext | $context |
Reimplemented in ResourceLoaderLessVarFileModule.
Definition at line 602 of file ResourceLoaderModule.php.
References $lang, ResourceLoaderContext\getLanguage(), and ResourceLoaderContext\getResourceLoader().
Referenced by ResourceLoaderFileModule\getDefinitionSummary().
ResourceLoaderModule::getMessages | ( | ) |
Get the messages needed for this module.
To get a JSON blob with messages, use MessageBlobStore::get()
Reimplemented in ResourceLoaderFileModule, and ResourceLoaderLessVarFileModule.
Definition at line 377 of file ResourceLoaderModule.php.
Referenced by MessageBlobStore\generateMessageBlob(), and MessageBlobStore\makeCacheKey().
ResourceLoaderModule::getModuleContent | ( | ResourceLoaderContext | $context | ) |
Get an array of this module's resources.
Ready for serving to the web.
ResourceLoaderContext | $context |
Definition at line 728 of file ResourceLoaderModule.php.
References ResourceLoaderContext\getHash().
ResourceLoaderModule::getName | ( | ) |
Get this module's name.
This is set when the module is registered with ResourceLoader::register()
Definition at line 115 of file ResourceLoaderModule.php.
References $name.
Referenced by MessageBlobStore\generateMessageBlob(), MessageBlobStore\getBlob(), getDeprecationInformation(), and MessageBlobStore\makeCacheKey().
ResourceLoaderModule::getOrigin | ( | ) |
Get this module's origin.
This is set when the module is registered with ResourceLoader::register()
Definition at line 161 of file ResourceLoaderModule.php.
References $origin.
Referenced by OutputPage\filterModules().
|
protected |
Get a list of resources that web browsers may preload.
Behaviour of rel=preload link is specified at https://www.w3.org/TR/preload/.
Use case for ResourceLoader originally part of T164299.
ResourceLoaderContext | $context |
Reimplemented in ResourceLoaderSkinModule.
Definition at line 705 of file ResourceLoaderModule.php.
|
static |
Make file paths relative to MediaWiki directory.
This is used to make file paths safe for storing in a database without the paths becoming stale or incorrect when MediaWiki is moved or upgraded (T111481).
array | $filePaths |
Definition at line 573 of file ResourceLoaderModule.php.
Referenced by ResourceLoaderFileModule\compileLessString().
ResourceLoaderModule::getScript | ( | ResourceLoaderContext | $context | ) |
Get all JS for this module for a given language and skin.
Includes all relevant JS except loader scripts.
For "plain" script modules, this should return a string with JS code. For multi-file modules where require() is used to load one file from another file, this should return an array structured as follows: [ 'files' => [ 'file1.js' => [ 'type' => 'script', 'content' => 'JS code' ], 'file2.js' => [ 'type' => 'script', 'content' => 'JS code' ], 'data.json' => [ 'type' => 'data', 'content' => array ] ], 'main' => 'file1.js' ]
ResourceLoaderContext | $context |
Reimplemented in ResourceLoaderFileModule, ResourceLoaderLanguageDataModule, ResourceLoaderStartUpModule, ResourceLoaderUserDefaultsModule, ResourceLoaderUserOptionsModule, and ResourceLoaderWikiModule.
Definition at line 214 of file ResourceLoaderModule.php.
ResourceLoaderModule::getScriptURLsForDebug | ( | ResourceLoaderContext | $context | ) |
Get the URL or URLs to load for this module's JS in debug mode.
The default behavior is to return a load.php?only=scripts URL for the module, but file-based modules will want to override this to load the files directly.
This function is called only when 1) we're in debug mode, 2) there is no only= parameter and 3) supportsURLLoading() returns true. #2 is important to prevent an infinite loop, therefore this function MUST return either an only= URL or a non-load.php URL.
ResourceLoaderContext | $context |
Reimplemented in ResourceLoaderFileModule.
Definition at line 303 of file ResourceLoaderModule.php.
References ResourceLoaderContext\getResourceLoader().
ResourceLoaderModule::getSkipFunction | ( | ) |
Get the skip function.
Modules that provide fallback functionality can provide a "skip function". This function, if provided, will be passed along to the module registry on the client. When this module is loaded (either directly or as a dependency of another module), then this function is executed first. If the function returns true, the module will instantly be considered "ready" without requesting the associated module resources.
The value returned here must be valid javascript for execution in a private function. It must not contain the "function () {" and "}" wrapper though.
Reimplemented in ResourceLoaderFileModule.
Definition at line 458 of file ResourceLoaderModule.php.
ResourceLoaderModule::getSource | ( | ) |
Get the source of this module.
Should only be overridden for foreign modules.
Definition at line 399 of file ResourceLoaderModule.php.
Referenced by ResourceLoaderWikiModule\shouldEmbedModule().
ResourceLoaderModule::getStyles | ( | ResourceLoaderContext | $context | ) |
Get all CSS for this module for a given skin.
ResourceLoaderContext | $context |
Reimplemented in ResourceLoaderFileModule, ResourceLoaderImageModule, ResourceLoaderSkinModule, and ResourceLoaderWikiModule.
Definition at line 339 of file ResourceLoaderModule.php.
ResourceLoaderModule::getStyleURLsForDebug | ( | ResourceLoaderContext | $context | ) |
Get the URL or URLs to load for this module's CSS in debug mode.
The default behavior is to return a load.php?only=styles URL for the module, but file-based modules will want to override this to load the files directly. See also getScriptURLsForDebug()
ResourceLoaderContext | $context |
Reimplemented in ResourceLoaderFileModule.
Definition at line 354 of file ResourceLoaderModule.php.
References ResourceLoaderContext\getResourceLoader().
ResourceLoaderModule::getTargets | ( | ) |
Get target(s) for the module, eg ['desktop'] or ['desktop', 'mobile'].
Reimplemented in ResourceLoaderFileModule.
Definition at line 428 of file ResourceLoaderModule.php.
ResourceLoaderModule::getTemplates | ( | ) |
Takes named templates by the module and returns an array mapping.
Reimplemented in ResourceLoaderFileModule.
Definition at line 225 of file ResourceLoaderModule.php.
ResourceLoaderModule::getType | ( | ) |
Get the module's load type.
Reimplemented in ResourceLoaderFileModule, ResourceLoaderImageModule, ResourceLoaderSiteStylesModule, ResourceLoaderUserStylesModule, and ResourceLoaderWikiModule.
Definition at line 439 of file ResourceLoaderModule.php.
|
static |
Get vary string.
ResourceLoaderContext | $context |
Definition at line 1051 of file ResourceLoaderModule.php.
References ResourceLoaderContext\getLanguage(), and ResourceLoaderContext\getSkin().
Referenced by ResourceLoader\preloadModuleInfo().
ResourceLoaderModule::getVersionHash | ( | ResourceLoaderContext | $context | ) |
Get a string identifying the current version of this module in a given context.
Whenever anything happens that changes the module's response (e.g. scripts, styles, and messages) this value must change. This value is used to store module responses in cache. (Both client-side and server-side.)
It is not recommended to override this directly. Use getDefinitionSummary() instead. If overridden, one must call the parent getVersionHash(), append data and re-hash.
This method should be quick because it is frequently run by ResourceLoaderStartUpModule to propagate changes to the client and effectively invalidate cache.
ResourceLoaderContext | $context |
Definition at line 858 of file ResourceLoaderModule.php.
References ResourceLoaderContext\getHash(), and ResourceLoader\makeHash().
ResourceLoaderModule::isKnownEmpty | ( | ResourceLoaderContext | $context | ) |
Check whether this module is known to be empty.
If a child class has an easy and cheap way to determine that this module is definitely going to be empty, it should override this method to return true in that case. Callers may optimize the request for this module away if this function returns true.
ResourceLoaderContext | $context |
Reimplemented in ResourceLoaderSkinModule, and ResourceLoaderWikiModule.
Definition at line 957 of file ResourceLoaderModule.php.
ResourceLoaderModule::requiresES6 | ( | ) |
Whether the module requires ES6 support in the client.
If the client does not support ES6, attempting to load a module that requires ES6 will result in an error.
Reimplemented in ResourceLoaderFileModule.
Definition at line 472 of file ResourceLoaderModule.php.
|
staticprotected |
Compute a non-cryptographic string hash of a file's contents.
If the file does not exist or cannot be read, returns an empty string.
string | $filePath | File path |
Definition at line 1040 of file ResourceLoaderModule.php.
References FileContentsHasher\getFileContentsHash().
|
protected |
Save the indirect dependencies for this module persuant to the skin/language context.
ResourceLoaderContext | $context | |
string[] | $curFileRefs | List of newly computed indirect file dependencies |
Definition at line 530 of file ResourceLoaderModule.php.
Referenced by ResourceLoaderFileModule\getStyles().
ResourceLoaderModule::setConfig | ( | Config | $config | ) |
Config | $config |
Definition at line 246 of file ResourceLoaderModule.php.
References $config.
ResourceLoaderModule::setDependencyAccessCallbacks | ( | callable | $loadCallback, |
callable | $saveCallback | ||
) |
Inject the functions that load/save the indirect file path dependency list from storage.
callable | $loadCallback | Function of (module name, variant) |
callable | $saveCallback | Function of (module name, variant, current paths, stored paths) |
Definition at line 149 of file ResourceLoaderModule.php.
ResourceLoaderModule::setFileDependencies | ( | ResourceLoaderContext | $context, |
array | $paths | ||
) |
Set the indirect dependencies for this module persuant to the skin/language context.
These are only image files referenced by the module's stylesheet
ResourceLoaderContext | $context | |
string[] | $paths | List of absolute file paths |
Definition at line 518 of file ResourceLoaderModule.php.
ResourceLoaderModule::setHookContainer | ( | HookContainer | $hookContainer | ) |
HookContainer | $hookContainer |
Definition at line 273 of file ResourceLoaderModule.php.
ResourceLoaderModule::setLogger | ( | LoggerInterface | $logger | ) |
LoggerInterface | $logger |
Definition at line 254 of file ResourceLoaderModule.php.
References $logger.
ResourceLoaderModule::setMessageBlob | ( | $blob, | |
$lang | |||
) |
Set in-object cache for message blobs.
Used to allow fetching of message blobs in batches. See ResourceLoader::preloadModuleInfo().
string | null | $blob | JSON blob or null |
string | $lang | Language code |
Definition at line 628 of file ResourceLoaderModule.php.
ResourceLoaderModule::setName | ( | $name | ) |
Set this module's name.
This is called by ResourceLoader::register() when registering the module. Other code should not call this.
string | $name |
Definition at line 125 of file ResourceLoaderModule.php.
References $name.
ResourceLoaderModule::setSkinStylesOverride | ( | array | $moduleSkinStyles | ) |
Provide overrides for skinStyles to modules that support that.
This MUST be called after self::setName().
array | $moduleSkinStyles |
Reimplemented in ResourceLoaderFileModule, and ResourceLoaderOOUIFileModule.
Definition at line 138 of file ResourceLoaderModule.php.
ResourceLoaderModule::shouldEmbedModule | ( | ResourceLoaderContext | $context | ) |
Check whether this module should be embeded rather than linked.
Modules returning true here will be embedded rather than loaded by ResourceLoaderClientHtml.
ResourceLoaderContext | $context |
Reimplemented in ResourceLoaderWikiModule.
Definition at line 972 of file ResourceLoaderModule.php.
ResourceLoaderModule::supportsURLLoading | ( | ) |
Whether this module supports URL loading.
If this function returns false, getScript() will be used even in cases (debug mode, no only param) where getScriptURLsForDebug() would normally be used instead.
Reimplemented in ResourceLoaderFileModule, ResourceLoaderImageModule, ResourceLoaderLanguageDataModule, ResourceLoaderStartUpModule, and ResourceLoaderUserOptionsModule.
Definition at line 326 of file ResourceLoaderModule.php.
|
protected |
Validate a user-provided JavaScript blob.
string | $fileName | |
string | $contents | JavaScript code |
mw.log.error()
to communicate a syntax error. Definition at line 984 of file ResourceLoaderModule.php.
References $cache.
Referenced by ResourceLoaderWikiModule\getScript().
|
protected |
Definition at line 41 of file ResourceLoaderModule.php.
Referenced by getConfig(), ResourceLoaderUserModule\getPages(), ResourceLoaderUserStylesModule\getPages(), ResourceLoaderWikiModule\getPages(), and setConfig().
|
protected |
Map of (context hash => cached module content)
Definition at line 66 of file ResourceLoaderModule.php.
|
private |
Function of (module name, variant) to get indirect file dependencies.
Definition at line 72 of file ResourceLoaderModule.php.
|
protected |
Deprecation string or true if deprecated; false otherwise.
Definition at line 77 of file ResourceLoaderModule.php.
Referenced by getDeprecationInformation().
|
private |
Function of (module name, variant) to get indirect file dependencies.
Definition at line 74 of file ResourceLoaderModule.php.
|
protected |
Map of (variant => indirect file dependencies)
Definition at line 60 of file ResourceLoaderModule.php.
|
private |
Definition at line 69 of file ResourceLoaderModule.php.
|
protected |
Definition at line 43 of file ResourceLoaderModule.php.
Referenced by getLogger(), and setLogger().
|
protected |
Map of (language => in-object cache for message blob)
Definition at line 62 of file ResourceLoaderModule.php.
|
protected |
Module name.
Definition at line 55 of file ResourceLoaderModule.php.
Referenced by getDeprecationInformation(), getName(), ResourceLoaderWikiModule\preloadTitleInfo(), and setName().
|
protected |
Script and style modules form a hierarchy of trustworthiness, with core modules like skins and jQuery as most trustworthy, and user scripts as least trustworthy.
We can limit the types of scripts and styles we allow to load on, say, sensitive special pages like Special:UserLogin and Special:Preferences
Definition at line 52 of file ResourceLoaderModule.php.
Referenced by getOrigin().
|
protected |
What client platforms the module targets (e.g.
desktop, mobile)
Definition at line 57 of file ResourceLoaderModule.php.
|
protected |
Map of (context hash => cached module version hash)
Definition at line 64 of file ResourceLoaderModule.php.