MediaWiki REL1_31
EmptyResourceLoader Class Reference
Inheritance diagram for EmptyResourceLoader:
Collaboration diagram for EmptyResourceLoader:

Public Member Functions

 __construct (Config $config=null, LoggerInterface $logger=null)
 Register core modules and runs registration hooks.
 
 getErrors ()
 
- Public Member Functions inherited from ResourceLoader
 addSource ( $id, $loadUrl=null)
 Add a foreign source of modules.
 
 createLoaderURL ( $source, ResourceLoaderContext $context, $extraQuery=[])
 Build a load.php URL.
 
 getCombinedVersion (ResourceLoaderContext $context, array $moduleNames)
 Helper method to get and combine versions of multiple modules.
 
 getConfig ()
 
 getLessCompiler ( $extraVars=[])
 Returns LESS compiler set up for use with MediaWiki.
 
 getLessVars ()
 Get global LESS variables.
 
 getLoadScript ( $source)
 Get the URL to the load.php endpoint for the given ResourceLoader source.
 
 getLogger ()
 
 getMessageBlobStore ()
 
 getModule ( $name)
 Get the ResourceLoaderModule object for a given module name.
 
 getModuleNames ()
 Get a list of module names.
 
 getModulesByMessage ( $messageKey)
 Get names of modules that use a certain message.
 
 getSources ()
 Get the list of sources.
 
 getTestModuleNames ( $framework='all')
 Get a list of test module names for one (or all) frameworks.
 
 isModuleRegistered ( $name)
 Check whether a ResourceLoader module is registered.
 
 makeModuleResponse (ResourceLoaderContext $context, array $modules, array $missing=[])
 Generate code for a response.
 
 makeVersionQuery (ResourceLoaderContext $context)
 Get the expected value of the 'version' query parameter.
 
 preloadModuleInfo (array $moduleNames, ResourceLoaderContext $context)
 Load information stored in the database about modules.
 
 register ( $name, $info=null)
 Register a module with the ResourceLoader system.
 
 registerTestModules ()
 
 respond (ResourceLoaderContext $context)
 Output a response to a load request, including the content-type header.
 
 setLogger (LoggerInterface $logger)
 
 setMessageBlobStore (MessageBlobStore $blobStore)
 

Additional Inherited Members

- Static Public Member Functions inherited from ResourceLoader
static clearCache ()
 Reset static members used for caching.
 
static filter ( $filter, $data, array $options=[])
 Run JavaScript or CSS data through a filter, caching the filtered result for future calls.
 
static formatException ( $e)
 Handle exception display.
 
static inDebugMode ()
 Determine whether debug mode was requested Order of priority is 1) request param, 2) cookie, 3) $wg setting.
 
static isValidModuleName ( $moduleName)
 Check a module name for validity.
 
static makeCombinedStyles (array $stylePairs)
 Combines an associative array mapping media type to CSS into a single stylesheet with "@media" blocks.
 
static makeComment ( $text)
 Generate a CSS or JS comment block.
 
static makeConfigSetScript (array $configuration)
 Returns JS code which will set the MediaWiki configuration array to the given value.
 
static makeCustomLoaderScript ( $name, $version, $dependencies, $group, $source, $script)
 Returns JS code which calls the script given by $script.
 
static makeHash ( $value)
 
static makeInlineScript ( $script)
 Returns an HTML script tag that runs given JS code after startup and base modules.
 
static makeLoaderConditionalScript ( $script)
 Wraps JavaScript code to run after startup and base modules.
 
static makeLoaderQuery ( $modules, $lang, $skin, $user=null, $version=null, $debug=false, $only=null, $printable=false, $handheld=false, $extraQuery=[])
 Build a query array (array representation of query string) for load.php.
 
static makeLoaderRegisterScript ( $name, $version=null, $dependencies=null, $group=null, $source=null, $skip=null)
 Returns JS code which calls mw.loader.register with the given parameters.
 
static makeLoaderSourcesScript ( $id, $loadUrl=null)
 Returns JS code which calls mw.loader.addSource() with the given parameters.
 
static makeLoaderStateScript ( $name, $state=null)
 Returns a JS call to mw.loader.state, which sets the state of a module or modules to a given value.
 
static makeMessageSetScript ( $messages)
 Returns JS code which, when called, will register a given list of messages.
 
static makePackedModulesString ( $modules)
 Convert an array of module names to a packed query string.
 
- Protected Member Functions inherited from ResourceLoader
 isFileModule ( $name)
 Return whether the definition of a module corresponds to a simple ResourceLoaderFileModule or one of its subclasses.
 
 measureResponseTime (Timing $timing)
 
 outputErrorAndLog (Exception $e, $msg, array $context=[])
 Add an error to the 'errors' array and log it.
 
 sendResponseHeaders (ResourceLoaderContext $context, $etag, $errors, array $extra=[])
 Send main response headers to the client.
 
 tryRespondFromFileCache (ResourceFileCache $fileCache, ResourceLoaderContext $context, $etag)
 Send out code for a response from file cache if possible.
 
 tryRespondNotModified (ResourceLoaderContext $context, $etag)
 Respond with HTTP 304 Not Modified if appropiate.
 
- Static Protected Member Functions inherited from ResourceLoader
static createLoaderQuery (ResourceLoaderContext $context, $extraQuery=[])
 Helper for createLoaderURL()
 
static formatExceptionNoComment ( $e)
 Handle exception display.
 
static makeLoaderImplementScript ( $name, $scripts, $styles, $messages, $templates)
 Return JS code that calls mw.loader.implement with given module properties.
 
- Protected Attributes inherited from ResourceLoader
MessageBlobStore $blobStore
 
 $config
 
array $errors = []
 Errors accumulated during current respond() call.
 
array $extraHeaders = []
 List of extra HTTP response headers provided by loaded modules.
 
array $moduleInfos = []
 Associative array mapping module name to info associative array.
 
array $modules = []
 Module name/ResourceLoaderModule object pairs.
 
array $sources = []
 E.g.
 
array $testModuleNames = []
 Associative array mapping framework ids to a list of names of test suite modules like [ 'qunit' => [ 'mediawiki.tests.qunit.suites', 'ext.foo.tests', ... ], ... ].
 
- Static Protected Attributes inherited from ResourceLoader
static bool $debugMode = null
 
static int $filterCacheVersion = 7
 

Detailed Description

Definition at line 171 of file ResourceLoaderTestCase.php.

Constructor & Destructor Documentation

◆ __construct()

EmptyResourceLoader::__construct ( Config  $config = null,
LoggerInterface  $logger = null 
)

Register core modules and runs registration hooks.

Parameters
Config$config[optional]
LoggerInterface$logger[optional]

Reimplemented from ResourceLoader.

Definition at line 174 of file ResourceLoaderTestCase.php.

References ResourceLoader\$config, ResourceLoader\$logger, ResourceLoader\addSource(), ResourceLoader\getLogger(), ResourceLoader\setLogger(), and ResourceLoader\setMessageBlobStore().

Member Function Documentation

◆ getErrors()

EmptyResourceLoader::getErrors ( )

Definition at line 182 of file ResourceLoaderTestCase.php.

References ResourceLoader\$errors.


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