Exemplo n.º 1
0
// ("DEBUG") are currently the only valid options.  The former will
// try to get the non-minimized, non-debug version, and the latter
// will get the debug version.
$loader->filter = YUI_DEBUG;
// Set allowRollups to false to prevent automatic rollup.
// $loader->allowRollups = false;
// A list of modules to apply the filter to.  If not supplied, all
// modules will have any defined filters applied.  This can be useful
// when debugging, limiting the amount of noise YUI generates.
// $loader->filterList = array(
// "dragdrop" => true
// );
// If the version is set, a querystring parameter is appended to the
// end of all generated URLs.  This is a cache busting hack for environments
// that always use the same path for the current version of the library.
// $loader->version = "2.4.0";
encoded_out($loader->tags());
// Alternatively, separate calls for css and js
// encoded_out($loader->css());
// print_r('<p>-----------------------------------------------------</p>');
// encoded_out($loader->script());
// JSON output
// encoded_out($loader->json()); // new data struct, bug 1567133
// Just get the data (same struct that json() outputs) as an array
// encoded_out(var_export($loader->data(), true));
print_r('<p>-----------------------------------------------------</p>');
encoded_out($loader->getLoadedModulesAsJSON());
// new data struct, bug 1567133
print_r('<p>-----------------------------------------------------</p>');
encoded_out(var_export($loader->getLoadedModules(), true));
// bug 1512927
Exemplo n.º 2
0
encoded_out("<!-- css -->\n");
encoded_out($l8->css());
encoded_out("<!-- js -->\n");
encoded_out($l8->script());
/* separate css and js output */
//////////////////////////////////////////////////////////////////////////
encoded_out("\n\nTest 9:\n\n");
$l9 = new YAHOO_util_Loader(YUI_VERSION_TO_TEST);
$l9->load("calendar");
encoded_out($l9->json());
/* json */
//////////////////////////////////////////////////////////////////////////
encoded_out("\n\nTest 10:\n\n");
$l10 = new YAHOO_util_Loader(YUI_VERSION_TO_TEST);
$l10->load("calendar");
encoded_out($l10->embed());
///////////////////////////////////////////
encoded_out("\n\nTest 11:\n\n");
//$yui_config->configDebug(array(
//"menu" => true
//));
$l11 = new YAHOO_util_Loader(YUI_VERSION_TO_TEST);
$l11->base = "../../build/";
$l11->filter = YUI_DEBUG;
$l11->load("menu");
encoded_out($l11->tags());
encoded_out($l11->getLoadedModulesAsJSON());
/* embed */
?>