コード例 #1
0
ファイル: ResourceLoader.php プロジェクト: richhl/kalturaCE
// Check if being used in mediaWiki ( ResourceLoader.php is NOT an entry point )
if (is_file(dirname(__FILE__) . '../mwResourceLoader.php') && !defined('SCRIPTLOADER_MEDIAWIKI')) {
    die('ResourceLoader.php is not an entry point when used with the JS2 extension');
}
// Check if we are an entry point or being used as part of MEDIAWIKI:
if (!defined('MEDIAWIKI') && !defined('SCRIPTLOADER_MEDIAWIKI')) {
    // Include settings ( will include LocalSettings.php in the root mwEmbed folder
    require_once dirname(__FILE__) . '/includes/DefaultSettings.php';
    // Load stand alone Resource Loader config
    // ( if running as a remote, mediaWiki variables / functions are already included as part of mediaWiki )
    require_once realpath(dirname(__FILE__)) . '/includes/noMediaWikiConfig.php';
    $myResourceLoader = new ResourceLoader();
    if ($myResourceLoader->outputFromCache()) {
        exit;
    }
    $myResourceLoader->doResourceLoader();
}
class ResourceLoader
{
    // The list of named javascript & css files
    private $namedFileList = array();
    // The language code for the script-loader request
    var $langCode = '';
    // The output string
    var $output = '';
    // Special prepend js var to be added to the top of minification output.
    // useful for special comment tags in minification output
    var $notMinifiedTopOutput = '';
    // The request Key for the js
    var $requestKey = '';
    // Error msg