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

Public Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from ResourceLoader
static clearCache ()
 Reset static members used for caching. More...
 
static encodeJsonForScript ( $data)
 Wrapper around json_encode that avoids needless escapes, and pretty-prints in debug mode. More...
 
static expandModuleNames ( $modules)
 Expand a string of the form jquery.foo,bar|jquery.ui.baz,quux to an array of module names like `[ 'jquery.foo', 'jquery.bar', 'jquery.ui.baz', 'jquery.ui.quux' ]`. More...
 
static filter ( $filter, $data, array $options=[])
 Run JavaScript or CSS data through a filter, caching the filtered result for future calls. More...
 
static formatException ( $e)
 Handle exception display. More...
 
static inDebugMode ()
 Determine whether debug mode was requested Order of priority is 1) request param, 2) cookie, 3) $wg setting. More...
 
static isValidModuleName ( $moduleName)
 Check a module name for validity. More...
 
static makeCombinedStyles (array $stylePairs)
 Combines an associative array mapping media type to CSS into a single stylesheet with "@media" blocks. More...
 
static makeComment ( $text)
 Generate a CSS or JS comment block. More...
 
static makeConfigSetScript (array $configuration)
 Returns JS code which will set the MediaWiki configuration array to the given value. More...
 
static makeHash ( $value)
 
static makeInlineCodeWithModule ( $modules, $script)
 Wraps JavaScript code to run after a required module. More...
 
static makeInlineScript ( $script, $nonce=null)
 Returns an HTML script tag that runs given JS code after startup and base modules. More...
 
static makeLoaderConditionalScript ( $script)
 Wraps JavaScript code to run after the startup module. More...
 
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. More...
 
static makeLoaderRegisterScript (array $modules)
 Returns JS code which calls mw.loader.register with the given parameter. More...
 
static makeLoaderSourcesScript ( $sources, $loadUrl=null)
 Returns JS code which calls mw.loader.addSource() with the given parameters. More...
 
static makeLoaderStateScript ( $states, $state=null)
 Returns a JS call to mw.loader.state, which sets the state of one ore more modules to a given value. More...
 
static makeMessageSetScript ( $messages)
 Returns JS code which, when called, will register a given list of messages. More...
 
static makePackedModulesString ( $modules)
 Convert an array of module names to a packed query string. More...
 
- Protected Member Functions inherited from ResourceLoader
 isFileModule ( $name)
 Whether the module is a ResourceLoaderFileModule (including subclasses). More...
 
 measureResponseTime (Timing $timing)
 
 sendResponseHeaders (ResourceLoaderContext $context, $etag, $errors, array $extra=[])
 Send main response headers to the client. More...
 
 tryRespondFromFileCache (ResourceFileCache $fileCache, ResourceLoaderContext $context, $etag)
 Send out code for a response from file cache if possible. More...
 
 tryRespondNotModified (ResourceLoaderContext $context, $etag)
 Respond with HTTP 304 Not Modified if appropiate. More...
 
- Static Protected Member Functions inherited from ResourceLoader
static createLoaderQuery (ResourceLoaderContext $context, $extraQuery=[])
 Helper for createLoaderURL() More...
 
static formatExceptionNoComment ( $e)
 Handle exception display. More...
 
static makeLoaderImplementScript ( $name, $scripts, $styles, $messages, $templates)
 Return JS code that calls mw.loader.implement with given module properties. More...
 
- Protected Attributes inherited from ResourceLoader
MessageBlobStore $blobStore
 
 $config
 
array $errors = []
 Errors accumulated during current respond() call. More...
 
array $extraHeaders = []
 List of extra HTTP response headers provided by loaded modules. More...
 
array $moduleInfos = []
 Associative array mapping module name to info associative array. More...
 
array $modules = []
 Module name/ResourceLoaderModule object pairs. More...
 
array $sources = []
 E.g. More...
 
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', ... More...
 
- Static Protected Attributes inherited from ResourceLoader
static bool $debugMode = null
 

Detailed Description

Definition at line 204 of file ResourceLoaderTestCase.php.

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ getErrors()

EmptyResourceLoader::getErrors ( )

Definition at line 209 of file ResourceLoaderTestCase.php.


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