Reorganize ResourceLoader fields
Change-Id: I9c9aece69b869165b8d9037336c8a2e7d7189c1e
This commit is contained in:
parent
4a1517b3e1
commit
440dfcf6d8
1 changed files with 30 additions and 54 deletions
|
|
@ -36,65 +36,41 @@ use Wikimedia\WrappedString;
|
||||||
* https://www.mediawiki.org/wiki/ResourceLoader
|
* https://www.mediawiki.org/wiki/ResourceLoader
|
||||||
*/
|
*/
|
||||||
class ResourceLoader implements LoggerAwareInterface {
|
class ResourceLoader implements LoggerAwareInterface {
|
||||||
/** @var int */
|
/** @var Config $config */
|
||||||
const CACHE_VERSION = 8;
|
protected $config;
|
||||||
|
/** @var MessageBlobStore */
|
||||||
|
protected $blobStore;
|
||||||
|
|
||||||
|
/** @var LoggerInterface */
|
||||||
|
private $logger;
|
||||||
|
|
||||||
|
/** @var ResourceLoaderModule[] Map of (module name => ResourceLoaderModule) */
|
||||||
|
protected $modules = [];
|
||||||
|
/** @var array[] Map of (module name => associative info array) */
|
||||||
|
protected $moduleInfos = [];
|
||||||
|
/**
|
||||||
|
* Associative array mapping framework ids to a list of names of test suite modules
|
||||||
|
* like [ 'qunit' => [ 'mediawiki.tests.qunit.suites', 'ext.foo.tests', ... ], ... ]
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $testModuleNames = [];
|
||||||
|
/** @var string[] List of module names that contain QUnit test suites */
|
||||||
|
protected $testSuiteModuleNames = [];
|
||||||
|
|
||||||
|
/** @var array Map of (source => path); E.g. [ 'source-id' => 'http://.../load.php' ] */
|
||||||
|
protected $sources = [];
|
||||||
|
/** @var array Errors accumulated during current respond() call */
|
||||||
|
protected $errors = [];
|
||||||
|
/** @var string[] Extra HTTP response headers from modules loaded in makeModuleResponse() */
|
||||||
|
protected $extraHeaders = [];
|
||||||
|
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
protected static $debugMode = null;
|
protected static $debugMode = null;
|
||||||
|
|
||||||
/**
|
/** @var int */
|
||||||
* Module name/ResourceLoaderModule object pairs
|
const CACHE_VERSION = 8;
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $modules = [];
|
|
||||||
|
|
||||||
/**
|
/** @var string JavaScript / CSS pragma to disable minification. * */
|
||||||
* Associative array mapping module name to info associative array
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $moduleInfos = [];
|
|
||||||
|
|
||||||
/** @var Config $config */
|
|
||||||
protected $config;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of module names that contain QUnit test suites
|
|
||||||
* @var string[]
|
|
||||||
*/
|
|
||||||
protected $testSuiteModuleNames = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* E.g. [ 'source-id' => 'http://.../load.php' ]
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $sources = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Errors accumulated during current respond() call.
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $errors = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of extra HTTP response headers provided by loaded modules.
|
|
||||||
*
|
|
||||||
* Populated by makeModuleResponse().
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $extraHeaders = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var MessageBlobStore
|
|
||||||
*/
|
|
||||||
protected $blobStore;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var LoggerInterface
|
|
||||||
*/
|
|
||||||
private $logger;
|
|
||||||
|
|
||||||
/** @var string JavaScript / CSS pragma to disable minification. **/
|
|
||||||
const FILTER_NOMIN = '/*@nomin*/';
|
const FILTER_NOMIN = '/*@nomin*/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue