<?php
/**
- * Resource loader module based on local JavaScript/CSS files.
+ * ResourceLoader module based on local JavaScript/CSS files.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
protected $debugScripts = array();
- /**
- * @var array List of paths to JavaScript files to include in the startup module
- * @par Usage:
- * @code
- * array( [file-path], [file-path], ... )
- * @endcode
- */
- protected $loaderScripts = array();
-
/**
* @var array List of paths to CSS files to always include
* @par Usage:
* ),
* // Scripts to include in debug contexts
* 'debugScripts' => [file path string or array of file path strings],
- * // Scripts to include in the startup module
- * 'loaderScripts' => [file path string or array of file path strings],
* // Modules which must be loaded before this module
* 'dependencies' => [module name string or array of module name strings],
* 'templates' => array(
// Lists of file paths
case 'scripts':
case 'debugScripts':
- case 'loaderScripts':
case 'styles':
$this->{$member} = (array)$option;
break;
break;
// Single strings
case 'position':
- $this->isPositionDefined = true;
case 'group':
case 'skipFunction':
$this->{$member} = (string)$option;
return $this->debugRaw;
}
- /**
- * Get loader script.
- *
- * @return string|bool JavaScript code to be added to startup module
- */
- public function getLoaderScript() {
- if ( count( $this->loaderScripts ) === 0 ) {
- return false;
- }
- return $this->readScriptFiles( $this->loaderScripts );
- }
-
/**
* Get all styles for a given context.
*
$this->templates,
$context->getDebug() ? $this->debugScripts : array(),
$this->getLanguageScripts( $context->getLanguage() ),
- self::tryForKey( $this->skinScripts, $context->getSkin(), 'default' ),
- $this->loaderScripts
+ self::tryForKey( $this->skinScripts, $context->getSkin(), 'default' )
);
if ( $this->skipFunction ) {
$files[] = $this->skipFunction;
// - position (only used by OutputPage)
'scripts',
'debugScripts',
- 'loaderScripts',
'styles',
'languageScripts',
'skinScripts',
static $cache;
if ( !$cache ) {
- $cache = ObjectCache::newAccelerator( CACHE_ANYTHING );
+ $cache = ObjectCache::getLocalServerInstance( CACHE_ANYTHING );
}
// Construct a cache key from the LESS file name and a hash digest