MediaWiki master
|
Abstraction for ResourceLoader modules, with name registration and maxage functionality. More...
Inherits LoggerAwareInterface.
Inherited by MediaWiki\ResourceLoader\FileModule, MediaWiki\ResourceLoader\ImageModule, MediaWiki\ResourceLoader\StartUpModule, MediaWiki\ResourceLoader\UserOptionsModule, and MediaWiki\ResourceLoader\WikiModule.
Public Member Functions | |
enableModuleContentVersion () | |
Whether to generate version hash based on module content. | |
getConfig () | |
getDefinitionSummary (Context $context) | |
Get the definition summary for this module. | |
getDependencies (?Context $context=null) | |
Get a list of modules this module depends on. | |
getDeprecationInformation (Context $context) | |
Get JS representing deprecation information for the current module if available. | |
getDeprecationWarning () | |
Get the deprecation warning, if any. | |
getFlip (Context $context) | |
getGroup () | |
Specifies the group this module is in. | |
getHeaders (Context $context) | |
Get headers to send as part of a module web response. | |
getMessages () | |
Get the messages needed for this module. | |
getModuleContent (Context $context) | |
Get an array of this module's resources. | |
getName () | |
Get this module's name. | |
getOrigin () | |
Get this module's origin. | |
getScript (Context $context) | |
Get all JS for this module for a given language and skin. | |
getScriptURLsForDebug (Context $context) | |
Get alternative script URLs for legacy debug mode. | |
getSkins () | |
Get list of skins for which this module must be available to load. | |
getSkipFunction () | |
Get the skip function. | |
getSource () | |
Get the source of this module. | |
getStyles (Context $context) | |
Get all CSS for this module for a given skin. | |
getStyleURLsForDebug (Context $context) | |
Get the URL or URLs to load for this module's CSS in debug mode. | |
getTemplates () | |
Takes named templates by the module and returns an array mapping. | |
getType () | |
Get the module's load type. | |
getVersionHash (Context $context) | |
Get a string identifying the current version of this module in a given context. | |
isKnownEmpty (Context $context) | |
Check whether this module is known to be empty. | |
requiresES6 () | |
Whether the module requires ES6 support in the client. | |
setConfig (Config $config) | |
setFileDependencies (Context $context, array $paths) | |
Set the indirect dependencies for this module pursuant 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 (Context $context) | |
Check whether this module should be embedded rather than linked. | |
shouldSkipStructureTest () | |
Whether to skip the structure test ResourcesTest::testRespond() for this module. | |
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 (Context $context) |
Get vary string. | |
Protected Member Functions | |
buildContent (Context $context) | |
Bundle all resources attached to this module into an array. | |
getFileDependencies (Context $context) | |
Get the indirect dependencies for this module pursuant to the skin/language context. | |
getHookRunner () | |
Get a HookRunner for running core hooks. | |
getLessVars (Context $context) | |
Get module-specific LESS variables, if any. | |
getLogger () | |
getMessageBlob (Context $context) | |
Get the hash of the message blob. | |
getPreloadLinks (Context $context) | |
Get a list of resources that web browsers may preload. | |
saveFileDependencies (Context $context, array $curFileRefs) | |
Save the indirect dependencies for this module pursuant 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[] null | $skins = null |
Skin names. | |
array | $versionHash = [] |
Map of (context hash => cached module version hash) | |
Abstraction for ResourceLoader modules, with name registration and maxage functionality.
Definition at line 47 of file Module.php.
|
finalprotected |
Bundle all resources attached to this module into an array.
Context | $context |
Definition at line 790 of file Module.php.
References MediaWiki\ResourceLoader\Context\getDebug(), and MediaWiki\ResourceLoader\Context\getOnly().
MediaWiki\ResourceLoader\Module::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 MediaWiki\ResourceLoader\FileModule, MediaWiki\ResourceLoader\StartUpModule, and MediaWiki\ResourceLoader\WikiModule.
Definition at line 946 of file Module.php.
|
static |
Expand directories relative to $IP.
array | $filePaths |
Definition at line 633 of file Module.php.
MediaWiki\ResourceLoader\Module::getConfig | ( | ) |
Definition at line 266 of file Module.php.
References MediaWiki\ResourceLoader\Module\$config.
Referenced by MediaWiki\ResourceLoader\SiteModule\getPages(), MediaWiki\ResourceLoader\SiteStylesModule\getPages(), MediaWiki\ResourceLoader\UserModule\getPages(), MediaWiki\ResourceLoader\UserStylesModule\getPages(), MediaWiki\ResourceLoader\WikiModule\getPages(), MediaWiki\ResourceLoader\FileModule\getScriptURLsForDebug(), and MediaWiki\ResourceLoader\FileModule\getStyleURLsForDebug().
MediaWiki\ResourceLoader\Module::getDefinitionSummary | ( | Context | $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
.
Context | $context |
Reimplemented in MediaWiki\ResourceLoader\CodexModule, MediaWiki\ResourceLoader\FileModule, MediaWiki\ResourceLoader\ImageModule, MediaWiki\ResourceLoader\SkinModule, and MediaWiki\ResourceLoader\WikiModule.
Definition at line 993 of file Module.php.
MediaWiki\ResourceLoader\Module::getDependencies | ( | ?Context | $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.
Context | null | $context |
Reimplemented in MediaWiki\ResourceLoader\FileModule, MediaWiki\ResourceLoader\ForeignApiModule, and MediaWiki\ResourceLoader\SiteModule.
Definition at line 473 of file Module.php.
MediaWiki\ResourceLoader\Module::getDeprecationInformation | ( | Context | $context | ) |
Get JS representing deprecation information for the current module if available.
Context | $context |
Definition at line 181 of file Module.php.
References MediaWiki\ResourceLoader\Context\encodeJson(), MediaWiki\ResourceLoader\Module\getDeprecationWarning(), and wfDeprecated().
MediaWiki\ResourceLoader\Module::getDeprecationWarning | ( | ) |
Get the deprecation warning, if any.
Definition at line 196 of file Module.php.
References MediaWiki\ResourceLoader\Module\$deprecated, MediaWiki\ResourceLoader\Module\$name, and MediaWiki\ResourceLoader\Module\getName().
Referenced by MediaWiki\ResourceLoader\Module\getDeprecationInformation().
|
protected |
Get the indirect dependencies for this module pursuant to the skin/language context.
These are only image files referenced by the module's stylesheet
If neither setFileDependencies() nor setDependencyAccessCallbacks() was called, this will simply return a placeholder with an empty file list
Context | $context |
Definition at line 551 of file Module.php.
References MediaWiki\ResourceLoader\Context\getResourceLoader().
MediaWiki\ResourceLoader\Module::getFlip | ( | Context | $context | ) |
Context | $context |
Reimplemented in MediaWiki\ResourceLoader\FileModule.
Definition at line 168 of file Module.php.
References MediaWiki\ResourceLoader\Context\getDirection(), and MediaWiki\MediaWikiServices\getInstance().
MediaWiki\ResourceLoader\Module::getGroup | ( | ) |
Specifies the group this module is in.
Return one of the Module::GROUP_ constants for reserved group names with special behavior, or a freeform string. Refer to https://www.mediawiki.org/wiki/ResourceLoader/Architecture#Groups for documentation.
Reimplemented in MediaWiki\ResourceLoader\FileModule, MediaWiki\ResourceLoader\SiteStylesModule, MediaWiki\ResourceLoader\UserModule, MediaWiki\ResourceLoader\UserOptionsModule, MediaWiki\ResourceLoader\UserStylesModule, and MediaWiki\ResourceLoader\WikiModule.
Definition at line 444 of file Module.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().
Context | $context |
Definition at line 693 of file Module.php.
References $url.
|
protected |
Get a HookRunner for running core hooks.
Definition at line 316 of file Module.php.
Referenced by MediaWiki\ResourceLoader\ForeignApiModule\getDependencies(), MediaWiki\ResourceLoader\SiteModule\getPages(), MediaWiki\ResourceLoader\SiteStylesModule\getPages(), and MediaWiki\ResourceLoader\UserOptionsModule\getScript().
|
protected |
Get module-specific LESS variables, if any.
Context | $context |
Reimplemented in MediaWiki\ResourceLoader\LessVarFileModule, and MediaWiki\ResourceLoader\SkinModule.
Definition at line 762 of file Module.php.
Referenced by MediaWiki\ResourceLoader\FileModule\getDefinitionSummary().
|
protected |
Definition at line 294 of file Module.php.
References MediaWiki\ResourceLoader\Module\$logger.
Referenced by MediaWiki\ResourceLoader\WikiModule\getContentObj().
|
protected |
Get the hash of the message blob.
Context | $context |
Reimplemented in MediaWiki\ResourceLoader\LessVarFileModule.
Definition at line 649 of file Module.php.
References MediaWiki\ResourceLoader\Context\getLanguage(), and MediaWiki\ResourceLoader\Context\getResourceLoader().
Referenced by MediaWiki\ResourceLoader\FileModule\getDefinitionSummary().
MediaWiki\ResourceLoader\Module::getMessages | ( | ) |
Get the messages needed for this module.
To get a JSON blob with messages, use MessageBlobStore::get()
Reimplemented in MediaWiki\ResourceLoader\CodexModule, MediaWiki\ResourceLoader\FileModule, and MediaWiki\ResourceLoader\LessVarFileModule.
Definition at line 429 of file Module.php.
MediaWiki\ResourceLoader\Module::getModuleContent | ( | Context | $context | ) |
Get an array of this module's resources.
Ready for serving to the web.
Context | $context |
Definition at line 773 of file Module.php.
References MediaWiki\ResourceLoader\Context\getHash().
MediaWiki\ResourceLoader\Module::getName | ( | ) |
Get this module's name.
This is set when the module is registered with ResourceLoader::register()
Definition at line 127 of file Module.php.
References MediaWiki\ResourceLoader\Module\$name.
Referenced by MediaWiki\ResourceLoader\MessageBlobStore\getBlob(), and MediaWiki\ResourceLoader\Module\getDeprecationWarning().
MediaWiki\ResourceLoader\Module::getOrigin | ( | ) |
Get this module's origin.
This is set when the module is registered with ResourceLoader::register()
Definition at line 160 of file Module.php.
References MediaWiki\ResourceLoader\Module\$origin.
|
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.
Context | $context |
Reimplemented in MediaWiki\ResourceLoader\SkinModule.
Definition at line 750 of file Module.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 619 of file Module.php.
MediaWiki\ResourceLoader\Module::getScript | ( | Context | $context | ) |
Get all JS for this module for a given language and skin.
Includes all relevant JS except loader scripts.
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' ]
For plain concatenated scripts, this can either return a string, or an associative array similar to the one used for package files: [ 'plainScripts' => [ [ 'content' => 'JS code' ], [ 'content' => 'JS code' ], ], ]
Context | $context |
Reimplemented in MediaWiki\ResourceLoader\FileModule, MediaWiki\ResourceLoader\StartUpModule, MediaWiki\ResourceLoader\UserOptionsModule, and MediaWiki\ResourceLoader\WikiModule.
Definition at line 246 of file Module.php.
MediaWiki\ResourceLoader\Module::getScriptURLsForDebug | ( | Context | $context | ) |
Get alternative script URLs for legacy debug mode.
The default behavior is to return a load.php?only=scripts&module=<name>
URL.
Module classes that merely wrap one or more other script files in production mode, may override this method to return an array of raw URLs for those underlying scripts, if those are individually web-accessible.
The mw.loader client will load and execute each URL consecutively. This has the caveat of executing legacy debug scripts in the global scope, which is why non-package file modules tend to use file closures (T50886).
This function MUST NOT be called, unless all the following are true:
only=
parameter in the context,Point 2 prevents an infinite loop since we use the only=
mechanism in the return value. Overrides must similarly return with only
, or return or a non-load.php URL.
Context | $context |
Reimplemented in MediaWiki\ResourceLoader\FileModule.
Definition at line 346 of file Module.php.
References $url, and MediaWiki\ResourceLoader\Context\getResourceLoader().
MediaWiki\ResourceLoader\Module::getSkins | ( | ) |
Get list of skins for which this module must be available to load.
By default, modules are available to all skins.
This information may be used by the startup module to optimise registrations based on the current skin.
Definition at line 490 of file Module.php.
MediaWiki\ResourceLoader\Module::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 MediaWiki\ResourceLoader\FileModule.
Definition at line 520 of file Module.php.
MediaWiki\ResourceLoader\Module::getSource | ( | ) |
Get the source of this module.
Should only be overridden for foreign modules.
Definition at line 455 of file Module.php.
Referenced by MediaWiki\ResourceLoader\WikiModule\shouldEmbedModule().
MediaWiki\ResourceLoader\Module::getStyles | ( | Context | $context | ) |
Get all CSS for this module for a given skin.
Context | $context |
Reimplemented in MediaWiki\ResourceLoader\FileModule, MediaWiki\ResourceLoader\ImageModule, MediaWiki\ResourceLoader\SkinModule, and MediaWiki\ResourceLoader\WikiModule.
Definition at line 384 of file Module.php.
MediaWiki\ResourceLoader\Module::getStyleURLsForDebug | ( | Context | $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
This function must only be called when:
only=
parameter and,See also getScriptURLsForDebug().
Context | $context |
Reimplemented in MediaWiki\ResourceLoader\FileModule.
Definition at line 407 of file Module.php.
References $url, and MediaWiki\ResourceLoader\Context\getResourceLoader().
MediaWiki\ResourceLoader\Module::getTemplates | ( | ) |
Takes named templates by the module and returns an array mapping.
Reimplemented in MediaWiki\ResourceLoader\FileModule.
Definition at line 257 of file Module.php.
MediaWiki\ResourceLoader\Module::getType | ( | ) |
Get the module's load type.
Reimplemented in MediaWiki\ResourceLoader\FileModule, MediaWiki\ResourceLoader\ImageModule, MediaWiki\ResourceLoader\SiteStylesModule, MediaWiki\ResourceLoader\UserStylesModule, and MediaWiki\ResourceLoader\WikiModule.
Definition at line 501 of file Module.php.
|
static |
Get vary string.
Context | $context |
Definition at line 1113 of file Module.php.
References MediaWiki\ResourceLoader\Context\getLanguage(), and MediaWiki\ResourceLoader\Context\getSkin().
|
final |
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 caches, both server-side (by a CDN, or other HTTP cache), and client-side (in mw.loader.store
, and in the browser's own HTTP cache).
The underlying methods called here for any given module should be quick because this is called for potentially thousands of module bundles in the same request as part of the StartUpModule, which is how we invalidate caches and propagate changes to clients.
Context | $context |
Definition at line 906 of file Module.php.
References MediaWiki\ResourceLoader\Context\getDebug(), and MediaWiki\ResourceLoader\Context\getHash().
MediaWiki\ResourceLoader\Module::isKnownEmpty | ( | Context | $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.
Context | $context |
Reimplemented in MediaWiki\ResourceLoader\SkinModule, and MediaWiki\ResourceLoader\WikiModule.
Definition at line 1013 of file Module.php.
MediaWiki\ResourceLoader\Module::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 MediaWiki\ResourceLoader\FileModule.
Definition at line 534 of file Module.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 |
Definition at line 1102 of file Module.php.
|
protected |
Save the indirect dependencies for this module pursuant to the skin/language context.
Context | $context | |
string[] | $curFileRefs | List of newly computed indirect file dependencies |
Definition at line 586 of file Module.php.
References MediaWiki\ResourceLoader\Context\getResourceLoader().
Referenced by MediaWiki\ResourceLoader\FileModule\getStyles().
MediaWiki\ResourceLoader\Module::setConfig | ( | Config | $config | ) |
Config | $config |
Definition at line 278 of file Module.php.
References MediaWiki\ResourceLoader\Module\$config.
MediaWiki\ResourceLoader\Module::setFileDependencies | ( | Context | $context, |
array | $paths ) |
Set the indirect dependencies for this module pursuant to the skin/language context.
These are only image files referenced by the module's stylesheet
Context | $context | |
string[] | $paths | List of absolute file paths |
Definition at line 574 of file Module.php.
MediaWiki\ResourceLoader\Module::setHookContainer | ( | HookContainer | $hookContainer | ) |
HookContainer | $hookContainer |
Definition at line 305 of file Module.php.
MediaWiki\ResourceLoader\Module::setLogger | ( | LoggerInterface | $logger | ) |
LoggerInterface | $logger |
Definition at line 286 of file Module.php.
References MediaWiki\ResourceLoader\Module\$logger.
MediaWiki\ResourceLoader\Module::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 675 of file Module.php.
MediaWiki\ResourceLoader\Module::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 137 of file Module.php.
References MediaWiki\ResourceLoader\Module\$name.
MediaWiki\ResourceLoader\Module::setSkinStylesOverride | ( | array | $moduleSkinStyles | ) |
Provide overrides for skinStyles to modules that support that.
This MUST be called after self::setName().
array | $moduleSkinStyles |
Reimplemented in MediaWiki\ResourceLoader\FileModule, and MediaWiki\ResourceLoader\OOUIFileModule.
Definition at line 150 of file Module.php.
MediaWiki\ResourceLoader\Module::shouldEmbedModule | ( | Context | $context | ) |
Check whether this module should be embedded rather than linked.
Modules returning true here will be embedded rather than loaded by ClientHtml.
Context | $context |
Reimplemented in MediaWiki\ResourceLoader\WikiModule.
Definition at line 1028 of file Module.php.
MediaWiki\ResourceLoader\Module::shouldSkipStructureTest | ( | ) |
Whether to skip the structure test ResourcesTest::testRespond() for this module.
Reimplemented in MediaWiki\ResourceLoader\FileModule.
Definition at line 1040 of file Module.php.
MediaWiki\ResourceLoader\Module::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 MediaWiki\ResourceLoader\CodexModule, MediaWiki\ResourceLoader\FileModule, MediaWiki\ResourceLoader\ImageModule, MediaWiki\ResourceLoader\StartUpModule, MediaWiki\ResourceLoader\UserOptionsModule, and MediaWiki\ResourceLoader\WikiModule.
Definition at line 371 of file Module.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 1052 of file Module.php.
Referenced by MediaWiki\ResourceLoader\WikiModule\getScript().
|
protected |
Definition at line 49 of file Module.php.
Referenced by MediaWiki\ResourceLoader\Module\getConfig(), MediaWiki\ResourceLoader\UserModule\getPages(), MediaWiki\ResourceLoader\UserStylesModule\getPages(), MediaWiki\ResourceLoader\WikiModule\getPages(), MediaWiki\ResourceLoader\FileModule\getScriptURLsForDebug(), and MediaWiki\ResourceLoader\Module\setConfig().
|
protected |
Map of (context hash => cached module content)
Definition at line 74 of file Module.php.
|
protected |
Deprecation string or true if deprecated; false otherwise.
Definition at line 80 of file Module.php.
Referenced by MediaWiki\ResourceLoader\Module\getDeprecationWarning().
|
protected |
Map of (variant => indirect file dependencies)
Definition at line 68 of file Module.php.
|
protected |
Definition at line 51 of file Module.php.
Referenced by MediaWiki\ResourceLoader\Module\getLogger(), and MediaWiki\ResourceLoader\Module\setLogger().
|
protected |
Map of (language => in-object cache for message blob)
Definition at line 70 of file Module.php.
|
protected |
Module name.
Definition at line 63 of file Module.php.
Referenced by MediaWiki\ResourceLoader\Module\getDeprecationWarning(), MediaWiki\ResourceLoader\Module\getName(), and MediaWiki\ResourceLoader\Module\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 60 of file Module.php.
Referenced by MediaWiki\ResourceLoader\Module\getOrigin().
|
protected |
Skin names.
Definition at line 65 of file Module.php.
|
protected |
Map of (context hash => cached module version hash)
Definition at line 72 of file Module.php.