示例#1
0
文件: 2.0.php 项目: runt18/phploader
$loader = new YAHOO_util_Loader(YUI_VERSION_TO_TEST, 'config_v_2', $customConfig);
// What to load
$loader->load("menu", "animation", "test2");
// Automatically pull in optional dependencies
// $loader->loadOptional = true;
// Specify modules that are already on the page that should not
// be loaded again.
// $loader->setLoaded("event", "dom");
// $loader->setLoaded("yahoo-dom-event"); // bug 1081006
// The base will be combined with the module's 'path' attribute
// to create its URL, unless the module has a 'fullpath' attribute.
// The default is the path to the current YUI version yahooapis
$loader->base = "/build/";
// Configure the base dir for a set of modules.  This overrides
// the global base property
$loader->overrideBase("/otherbasedir/", array("test1", "test2", "test3"));
// No filter is applied by default.  YUI_RAW ("RAW") and YUI_DEBUG
// ("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