* @param LoggerInterface|null $logger [optional]
*/
public function __construct( Config $config = null, LoggerInterface $logger = null ) {
- global $IP;
-
$this->logger = $logger ?: new NullLogger();
if ( !$config ) {
// Add 'local' source first
$this->addSource( 'local', $config->get( 'LoadScript' ) );
- // Register core modules
- $this->register( include "$IP/resources/Resources.php" );
+ // Special module that always exists
+ $this->register( 'startup', [ 'class' => ResourceLoaderStartUpModule::class ] );
+
// Register extension modules
$this->register( $config->get( 'ResourceModules' ) );
* @throws MWException If a duplicate module registration is attempted
* @throws MWException If a module name contains illegal characters (pipes or commas)
* @throws MWException If something other than a ResourceLoaderModule is being registered
- * @return bool False if there were any errors, in which case one or more modules were
- * not registered
*/
public function register( $name, $info = null ) {
$moduleSkinStyles = $this->config->get( 'ResourceModuleSkinStyles' );