本文整理汇总了PHP中ResourceLoader::outputFromCache方法的典型用法代码示例。如果您正苦于以下问题:PHP ResourceLoader::outputFromCache方法的具体用法?PHP ResourceLoader::outputFromCache怎么用?PHP ResourceLoader::outputFromCache使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ResourceLoader
的用法示例。
在下文中一共展示了ResourceLoader::outputFromCache方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
* @file
*/
//Setup the script local script cache directory
// 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 = '';