base-base-debug.js revision e0008d92cea7515616980ad13e1075346a3bca2e
3738N/AYUI.add('base-base', function(Y) {
3738N/A
3738N/A /**
3738N/A * <p>
3738N/A * An augmentable class, which when augmented onto a Base based class, allows
3738N/A * the class to support plugins, providing plug and unplug methods and the ability
3738N/A * to add plugins through the configuration literal passed to the constructor.
3738N/A * </p>
3738N/A * <p>
3738N/A * The PlugHost's _initPlugins() and _destroyPlugins() methods should be invoked by the
3738N/A * host class at the appropriate point in the instance's lifecyle. This is done
3738N/A * by default for the Base class, so developers extending base don't need to do
3738N/A * anything to get plugin support.
3738N/A * </p>
3738N/A * @class PluginHost
3738N/A */
3738N/A
3738N/A var L = Y.Lang;
3738N/A
3738N/A function PluginHost(config) {
3738N/A this._plugins = {};
3738N/A }
3738N/A
3738N/A PluginHost.prototype = {
3738N/A
3738N/A /**
3738N/A * Adds a plugin to the host object. This will instantiate the
3738N/A * plugin and attach it to the configured namespace on the host object.
3738N/A *
3738N/A * @method plug
3738N/A * @chainable
3738N/A * @param p {Function | Object |Array} Accepts the plugin class, or an
3738N/A * object literal with a "fn" property specifying the plugin class and
3738N/A * a "cfg" property specifying the configuration for the Plugin.
3738N/A * <p>
3738N/A * Additionally an Array can also be passed in, with the above function or
3738N/A * object literal values, allowing the user to add multiple plugins in a single call.
3738N/A * </p>
3738N/A * @param config (Optional) If the first argument is the plugin class, the second argument
3738N/A * can be the configuration for the plugin.
3738N/A * @return {Base} A reference to the host object
3738N/A */
3738N/A
3738N/A plug: function(p, config) {
3738N/A if (p) {
3738N/A if (L.isFunction(p)) {
3738N/A this._plug(p, config);
3738N/A } else if (L.isArray(p)) {
3738N/A for (var i = 0, ln = p.length; i < ln; i++) {
3738N/A this.plug(p[i]);
3738N/A }
3738N/A } else {
3738N/A this._plug(p.fn, p.cfg);
3738N/A }
3738N/A }
3738N/A return this;
3738N/A },
3738N/A
3738N/A /**
3738N/A * Removes a plugin from the host object. This will destroy the
3738N/A * plugin instance and delete the namepsace from the host object.
3738N/A *
3738N/A * @method unplug
3738N/A * @param {String | Function} plugin The namespace of the plugin, or the plugin class with the static NS namespace property defined. If not provided,
3738N/A * all registered plugins are unplugged.
3738N/A * @return {Base} A reference to the host object
3738N/A * @chainable
3738N/A */
3738N/A unplug: function(plugin) {
3738N/A if (plugin) {
3738N/A this._unplug(plugin);
3738N/A } else {
3738N/A var ns;
3738N/A for (ns in this._plugins) {
3738N/A if (this._plugins.hasOwnProperty(ns)) {
3738N/A this._unplug(ns);
3738N/A }
3738N/A }
3738N/A }
3738N/A return this;
3738N/A },
3738N/A
3738N/A /**
3738N/A * Determines if a plugin has plugged into this host.
3738N/A *
3738N/A * @method hasPlugin
3738N/A * @param The plugin's namespace
3738N/A * @return {boolean} returns true, if the plugin has been plugged into this host, false otherwise.
3738N/A */
3738N/A hasPlugin : function(ns) {
3738N/A return (this._plugins[ns] && this[ns]);
3738N/A },
3738N/A
3738N/A /**
3738N/A * Initializes static plugins registered on the host (using the
3738N/A * Base.plug static method) and any plugins passed to the
3738N/A * instance through the "plugins" configuration property.
3738N/A *
3738N/A * @method _initPlugins
3738N/A * @param {Config} config The configuration object literal for the host.
3738N/A * @private
3738N/A */
3738N/A _initPlugins: function(config) {
3738N/A
3738N/A // Class Configuration
3738N/A var classes = this._getClasses(),
3738N/A plug = [],
3738N/A unplug = {},
3738N/A constructor, i, classPlug, classUnplug, pluginClassName;
3738N/A
3738N/A //TODO: Room for optimization. Can we apply statically/unplug in same pass?
3738N/A for (i = classes.length - 1; i >= 0; i--) {
3738N/A constructor = classes[i];
3738N/A
3738N/A classUnplug = constructor._UNPLUG;
3738N/A if (classUnplug) {
3738N/A // subclasses over-write
3738N/A Y.mix(unplug, classUnplug, true);
3738N/A }
3738N/A
3738N/A classPlug = constructor._PLUG;
3738N/A if (classPlug) {
3738N/A // subclasses over-write
3738N/A Y.mix(plug, classPlug, true);
3738N/A }
3738N/A }
3738N/A
3738N/A for (pluginClassName in plug) {
3738N/A if (plug.hasOwnProperty(pluginClassName)) {
3738N/A if (!unplug[pluginClassName]) {
3738N/A this.plug(plug[pluginClassName]);
3738N/A }
3738N/A }
3738N/A }
3738N/A
3738N/A // User Configuration
3738N/A if (config && config.plugins) {
3738N/A this.plug(config.plugins);
3738N/A }
3738N/A },
3738N/A
3738N/A /**
3738N/A * Unplugs and destroys all plugins on the host
3738N/A * @method _destroyPlugins
3738N/A * @private
3738N/A */
3738N/A _destroyPlugins: function() {
3738N/A this._unplug();
3738N/A },
3738N/A
3738N/A /**
3738N/A * Private method used to instantiate and attach plugins to the host
3738N/A *
3738N/A * @method _plug
3738N/A * @param {Function} PluginClass The plugin class to instantiate
3738N/A * @param {Object} config The configuration object for the plugin
3738N/A * @private
3738N/A */
3738N/A _plug: function(PluginClass, config) {
3738N/A if (PluginClass && PluginClass.NS) {
3738N/A var ns = PluginClass.NS;
3738N/A
3738N/A config = config || {};
3738N/A config.host = this;
3738N/A
3738N/A if (this.hasPlugin(ns)) {
3738N/A // Update config
3738N/A this[ns].setAttrs(config);
3738N/A } else {
3738N/A // Create new instance
3738N/A this[ns] = new PluginClass(config);
3738N/A this._plugins[ns] = PluginClass;
3738N/A }
3738N/A }
3738N/A },
3738N/A
3738N/A /**
3738N/A * Unplugs and destroys a plugin already instantiated with the host.
3738N/A *
3738N/A * @method _unplug
3738N/A * @private
3738N/A * @param {String | Function} plugin The namespace for the plugin, or a plugin class with the static NS property defined.
3738N/A */
3738N/A _unplug : function(plugin) {
3738N/A var ns = plugin,
3738N/A plugins = this._plugins;
3738N/A
3738N/A if (L.isFunction(plugin)) {
3738N/A ns = plugin.NS;
3738N/A if (ns && (!plugins[ns] || plugins[ns] !== plugin)) {
3738N/A ns = null;
3738N/A }
3738N/A }
3738N/A
3738N/A if (ns) {
3738N/A if (this[ns]) {
3738N/A this[ns].destroy();
3738N/A delete this[ns];
3738N/A }
3738N/A if (plugins[ns]) {
3738N/A delete plugins[ns];
3738N/A }
3738N/A }
3738N/A }
3738N/A };
3738N/A
3738N/A /**
3738N/A * Registers plugins to be instantiated at the class level (plugins
3738N/A * which should be plugged into every instance of the class by default).
3738N/A *
3738N/A * @method PluginHost.plug
3738N/A * @static
3738N/A *
3738N/A * @param {Function} hostClass The host class on which to register the plugins
3738N/A * @param {Function | Array} plugin Either the plugin class, an array of plugin classes or an array of object literals (with fn and cfg properties defined)
3738N/A * @param {Object} config (Optional) If plugin is the plugin class, the configuration for the plugin
3738N/A */
3738N/A PluginHost.plug = function(hostClass, plugin, config) {
3738N/A // Cannot plug into Base, since Plugins derive from Base [ will cause infinite recurrsion ]
3738N/A var p, i, l, name;
3738N/A
3738N/A if (hostClass !== Y.Base) {
3738N/A hostClass._PLUG = hostClass._PLUG || {};
3738N/A
3738N/A if (!L.isArray(plugin)) {
3738N/A if (config) {
3738N/A plugin = {fn:plugin, cfg:config};
3738N/A }
3738N/A plugin = [plugin];
3738N/A }
3738N/A
3738N/A for (i = 0, l = plugin.length; i < l;i++) {
3738N/A p = plugin[i];
3738N/A name = p.NAME || p.fn.NAME;
3738N/A hostClass._PLUG[name] = p;
3738N/A }
3738N/A }
3738N/A };
3738N/A
3738N/A /**
3738N/A * Unregisters any class level plugins which have been registered by the host class, or any
3738N/A * other class in the hierarchy.
3738N/A *
3738N/A * @method PluginHost.unplug
3738N/A * @static
3738N/A *
3738N/A * @param {Function} hostClass The host class from which to unregister the plugins
3738N/A * @param {Function | Array} plugin The plugin class, or an array of plugin classes
3738N/A */
3738N/A PluginHost.unplug = function(hostClass, plugin) {
3738N/A var p, i, l, name;
3738N/A
3738N/A if (hostClass !== Y.Base) {
3738N/A hostClass._UNPLUG = hostClass._UNPLUG || {};
3738N/A
3738N/A if (!L.isArray(plugin)) {
3738N/A plugin = [plugin];
3738N/A }
3738N/A
3738N/A for (i = 0, l = plugin.length; i < l; i++) {
3738N/A p = plugin[i];
3738N/A name = p.NAME;
3738N/A if (!hostClass._PLUG[name]) {
3738N/A hostClass._UNPLUG[name] = p;
3738N/A } else {
3738N/A delete hostClass._PLUG[name];
3738N/A }
3738N/A }
3738N/A }
3738N/A };
3738N/A
3738N/A Y.namespace("Plugin").Host = PluginHost;
3738N/A
3738N/A /**
3738N/A * The base module provides the Base class, which objects requiring managed attributes
3738N/A * and custom event support can extend. The base module also provides two ways to reuse
3738N/A * code - An augmentable PluginHost interface which provides plugin support
3738N/A * (which is augmented to the Base class) and Base.build which provides a way to
3738N/A * build custom classes using extensions.
3738N/A *
3738N/A * @module base
3738N/A */
3738N/A
3738N/A /**
3738N/A * The base-base submodule provides the Base class and augmentable PluginHost implementation,
3738N/A * without the extension support provided by Base.build.
3738N/A *
3738N/A * @module base
3738N/A * @submodule base-base
3738N/A */
3738N/A var O = Y.Object,
3738N/A DOT = ".",
3738N/A DESTROY = "destroy",
3738N/A INIT = "init",
3738N/A INITIALIZED = "initialized",
3738N/A DESTROYED = "destroyed",
3738N/A INITIALIZER = "initializer",
3738N/A OBJECT_CONSTRUCTOR = Object.prototype.constructor,
3738N/A DEEP = "deep",
3738N/A SHALLOW = "shallow",
3738N/A VALUE = "value",
3738N/A DESTRUCTOR = "destructor";
3738N/A
3738N/A /**
3738N/A * <p>
3738N/A * Provides a base class for which objects requiring managed attributes and
3738N/A * custom event support can extend. The Base class also handles the chaining of
3738N/A * initializer and destructor methods across the hierarchy as part of object construction
3738N/A * and destruction. Additionally, attributes configured through the static
3738N/A * <a href="#property_ATTRS">ATTRS</a> property for each class in the hierarchy will be
3738N/A * initialized by Base.
3738N/A * </p>
3738N/A *
3738N/A * <p>The static <a href="#property_NAME">NAME</a> property of each class extending
3738N/A * from Base will be used as the identifier for the class, and is used by Base to prefix
3738N/A * all events fired by instances of that class.</p>
3738N/A *
3738N/A * @class Base
3738N/A * @constructor
3738N/A * @uses Attribute, Plugin.Host
3738N/A *
3738N/A * @param {Object} config Object literal of configuration property name/value pairs
3738N/A */
3738N/A function Base() {
3738N/A Y.log('constructor called', 'life', 'base');
3738N/A
3738N/A Y.Attribute.call(this);
3738N/A Y.Plugin.Host.call(this);
3738N/A
3738N/A this._silentInit = this._silentInit || false;
3738N/A if (this._lazyAddAttrs !== false) { this._lazyAddAttrs = true; }
3738N/A
3738N/A this.init.apply(this, arguments);
3738N/A }
3738N/A
3738N/A /**
3738N/A * The list of properties which can be configured for
3738N/A * each attribute (e.g. setter, getter, writeOnce, readOnly etc.)
3738N/A *
3738N/A * @property Base._ATTR_CFG
3738N/A * @type Array
3738N/A * @static
3738N/A * @private
3738N/A */
3738N/A Base._ATTR_CFG = Y.Attribute._ATTR_CFG.concat("cloneDefaultValue");
3738N/A
3738N/A /**
3738N/A * <p>
3738N/A * The string to be used to identify instances of
3738N/A * this class, for example in prefixing events.
3738N/A * </p>
3738N/A * <p>
3738N/A * Classes extending Base, should define their own
3738N/A * static NAME property, which should be camelCase by
3738N/A * convention (e.g. MyClass.NAME = "myClass";).
3738N/A * </p>
3738N/A * @property NAME
3738N/A * @type String
3738N/A * @static
3738N/A */
3738N/A Base.NAME = 'base';
3738N/A
3738N/A /**
3738N/A * Object literal defining the set of attributes which
3738N/A * will be available for instances of this class, and
3738N/A * how they are configured. See Attribute's <a href="Attribute.html#method_addAttr">addAttr</a>
3738N/A * method for a description of configuration options available
3738N/A * for each attribute.
3738N/A *
3738N/A * @property ATTRS
3738N/A * @type Object
3738N/A * @static
3738N/A */
3738N/A Base.ATTRS = {
3738N/A /**
3738N/A * Flag indicating whether or not this object
3738N/A * has been through the init lifecycle phase.
3738N/A *
3738N/A * @attribute initialized
3738N/A * @readonly
3738N/A * @default false
3738N/A * @type boolean
3738N/A */
3738N/A initialized: {
3738N/A readOnly:true,
3738N/A value:false
3738N/A },
3738N/A
3738N/A /**
3738N/A * Flag indicating whether or not this object
3738N/A * has been through the destroy lifecycle phase.
3738N/A *
3738N/A * @attribute destroyed
3738N/A * @readonly
3738N/A * @default false
3738N/A * @type boolean
3738N/A */
3738N/A destroyed: {
3738N/A readOnly:true,
3738N/A value:false
3738N/A }
3738N/A };
3738N/A
3738N/A Base.prototype = {
3738N/A
3738N/A /**
3738N/A * Init lifecycle method, invoked during construction.
3738N/A * Fires the init event prior to setting up attributes and
3738N/A * invoking initializers for the class hierarchy.
3738N/A *
3738N/A * @method init
3738N/A * @final
3738N/A * @chainable
3738N/A * @param {Object} config Object literal of configuration property name/value pairs
3738N/A * @return {Base} A reference to this object
3738N/A */
3738N/A init: function(config) {
3738N/A Y.log('init called', 'life', 'base');
3738N/A
3738N/A /**
3738N/A * The string used to identify the class of this object.
3738N/A *
3738N/A * @deprecated Use this.constructor.NAME
3738N/A * @property name
3738N/A * @type String
3738N/A */
3738N/A this._yuievt.config.prefix = this.name = this.constructor.NAME;
3738N/A
3738N/A /**
3738N/A * <p>
3738N/A * Lifecycle event for the init phase, fired prior to initialization.
3738N/A * Invoking the preventDefault() method on the event object provided
3738N/A * to subscribers will prevent initialization from occuring.
3738N/A * </p>
3738N/A * <p>
3738N/A * Subscribers to the "after" momemt of this event, will be notified
3738N/A * after initialization of the object is complete (and therefore
3738N/A * cannot prevent initialization).
3738N/A * </p>
3738N/A *
3738N/A * @event init
3738N/A * @preventable _defInitFn
3738N/A * @param {Event.Facade} e Event object, with a cfg property which
3738N/A * refers to the configuration object literal passed to the constructor.
3738N/A */
3738N/A if (!this._silentInit) {
3738N/A this.publish(INIT, {
3738N/A queuable:false,
3738N/A defaultFn:this._defInitFn
3738N/A });
3738N/A }
if (config) {
if (config.on) {
this.on(config.on);
}
if (config.after) {
this.after(config.after);
}
}
if (!this._silentInit) {
this.fire(INIT, {cfg: config});
} else {
this._defInitFn({cfg: config});
}
return this;
},
/**
* <p>
* Destroy lifecycle method. Fires the destroy
* event, prior to invoking destructors for the
* class hierarchy.
* </p>
* <p>
* Subscribers to the destroy
* event can invoke preventDefault on the event object, to prevent destruction
* from proceeding.
* </p>
* @method destroy
* @return {Base} A reference to this object
* @final
* @chainable
*/
destroy: function() {
Y.log('destroy called', 'life', 'base');
/**
* <p>
* Lifecycle event for the destroy phase,
* fired prior to destruction. Invoking the preventDefault
* method on the event object provided to subscribers will
* prevent destruction from proceeding.
* </p>
* <p>
* Subscribers to the "after" moment of this event, will be notified
* after destruction is complete (and as a result cannot prevent
* destruction).
* </p>
* @event destroy
* @preventable _defDestroyFn
* @param {Event.Facade} e Event object
*/
this.publish(DESTROY, {
queuable:false,
defaultFn: this._defDestroyFn
});
this.fire(DESTROY);
return this;
},
/**
* Default init event handler
*
* @method _defInitFn
* @param {Event.Facade} e Event object, with a cfg property which
* refers to the configuration object literal passed to the constructor.
* @protected
*/
_defInitFn : function(e) {
this._initHierarchy(e.cfg);
this._initPlugins(e.cfg);
if (!this._silentInit) {
this._set(INITIALIZED, true);
} else {
this._conf.add(INITIALIZED, VALUE, true);
}
},
/**
* Default destroy event handler
*
* @method _defDestroyFn
* @param {Event.Facade} e Event object
* @protected
*/
_defDestroyFn : function(e) {
this._destroyHierarchy();
this._destroyPlugins();
this._set(DESTROYED, true);
},
/**
* Returns the class hierarchy for this object, with Base being the last class in the array.
*
* @method _getClasses
* @protected
* @return {Function[]} An array of classes (constructor functions), making up the class hierarchy for this object.
* This value is cached the first time the method, or _getAttrCfgs, is invoked. Subsequent invocations return the
* cached value.
*/
_getClasses : function() {
if (!this._classes) {
this._initHierarchyData();
}
return this._classes;
},
/**
* Returns an aggregated set of attribute configurations, by traversing the class hierarchy.
*
* @method _getAttrCfgs
* @protected
* @return {Object} The hash of attribute configurations, aggregated across classes in the hierarchy
* This value is cached the first time the method, or _getClasses, is invoked. Subsequent invocations return
* the cached value.
*/
_getAttrCfgs : function() {
if (!this._attrs) {
this._initHierarchyData();
}
return this._attrs;
},
/**
* A helper method used when processing ATTRS across the class hierarchy during
* initialization. Returns a disposable object with the attributes defined for
* the provided class, extracted from the set of all attributes passed in .
*
* @method _filterAttrCfs
* @private
*
* @param {Function} clazz The class for which the desired attributes are required.
* @param {Object} allCfgs The set of all attribute configurations for this instance.
* Attributes will be removed from this set, if they belong to the filtered class, so
* that by the time all classes are processed, allCfgs will be empty.
*
* @return {Object} The set of attributes belonging to the class passed in, in the form
* of an object literal with name/cfg pairs.
*/
_filterAttrCfgs : function(clazz, allCfgs) {
var cfgs = null, attr, attrs = clazz.ATTRS;
if (attrs) {
for (attr in attrs) {
if (attrs.hasOwnProperty(attr) && allCfgs[attr]) {
cfgs = cfgs || {};
cfgs[attr] = allCfgs[attr];
delete allCfgs[attr];
}
}
}
return cfgs;
},
/**
* A helper method used by _getClasses and _getAttrCfgs, which determines both
* the array of classes and aggregate set of attribute configurations
* across the class hierarchy for the instance.
*
* @method _initHierarchyData
* @private
*/
_initHierarchyData : function() {
var c = this.constructor,
classes = [],
attrs = [];
while (c) {
// Add to classes
classes[classes.length] = c;
// Add to attributes
if (c.ATTRS) {
attrs[attrs.length] = c.ATTRS;
}
c = c.superclass ? c.superclass.constructor : null;
}
this._classes = classes;
this._attrs = this._aggregateAttrs(attrs);
},
/**
* A helper method, used by _initHierarchyData to aggregate
* attribute configuration across the instances class hierarchy.
*
* The method will potect the attribute configuration value to protect the statically defined
* default value in ATTRS if required (value is an object literal or array or the
* attribute configuration has clone set to shallow or deep).
*
* @method _aggregateAttrs
* @private
* @param {Array} allAttrs An array of ATTRS definitions across classes in the hierarchy
* (subclass first, Base last)
* @return {Object} The aggregate set of ATTRS definitions for the instance
*/
_aggregateAttrs : function(allAttrs) {
var attr,
attrs,
cfg,
val,
path,
i,
clone,
cfgProps = Base._ATTR_CFG,
aggAttrs = {};
if (allAttrs) {
for (i = allAttrs.length-1; i >= 0; --i) {
attrs = allAttrs[i];
for (attr in attrs) {
if (attrs.hasOwnProperty(attr)) {
// Protect config passed in
cfg = Y.mix({}, attrs[attr], true, cfgProps);
val = cfg.value;
clone = cfg.cloneDefaultValue;
if (val) {
if ( (clone === undefined && (OBJECT_CONSTRUCTOR === val.constructor || L.isArray(val))) || clone === DEEP || clone === true) {
Y.log('Cloning default value for attribute:' + attr, 'info', 'base');
cfg.value = Y.clone(val);
} else if (clone === SHALLOW) {
Y.log('Merging default value for attribute:' + attr, 'info', 'base');
cfg.value = Y.merge(val);
}
// else if (clone === false), don't clone the static default value.
// It's intended to be used by reference.
}
path = null;
if (attr.indexOf(DOT) !== -1) {
path = attr.split(DOT);
attr = path.shift();
}
if (path && aggAttrs[attr] && aggAttrs[attr].value) {
O.setValue(aggAttrs[attr].value, path, val);
} else if (!path){
if (!aggAttrs[attr]) {
aggAttrs[attr] = cfg;
} else {
Y.mix(aggAttrs[attr], cfg, true, cfgProps);
}
}
}
}
}
}
return aggAttrs;
},
/**
* Initializes the class hierarchy for the instance, which includes
* initializing attributes for each class defined in the class's
* static <a href="#property_ATTRS">ATTRS</a> property and
* invoking the initializer method on the prototype of each class in the hierarchy.
*
* @method _initHierarchy
* @param {Object} userVals Object literal containing configuration name/value pairs
* @private
*/
_initHierarchy : function(userVals) {
var lazy = this._lazyAddAttrs,
constr,
constrProto,
ci,
ei,
el,
classes = this._getClasses(),
attrCfgs = this._getAttrCfgs();
for (ci = classes.length-1; ci >= 0; ci--) {
constr = classes[ci];
constrProto = constr.prototype;
if (constr._yuibuild && constr._yuibuild.exts && !constr._yuibuild.dynamic) {
for (ei = 0, el = constr._yuibuild.exts.length; ei < el; ei++) {
constr._yuibuild.exts[ei].apply(this, arguments);
}
}
this.addAttrs(this._filterAttrCfgs(constr, attrCfgs), userVals, lazy);
if (constrProto.hasOwnProperty(INITIALIZER)) {
constrProto.initializer.apply(this, arguments);
}
}
},
/**
* Destroys the class hierarchy for this instance by invoking
* the descructor method on the prototype of each class in the hierarchy.
*
* @method _destroyHierarchy
* @private
*/
_destroyHierarchy : function() {
var constr,
constrProto,
ci, cl,
classes = this._getClasses();
for (ci = 0, cl = classes.length; ci < cl; ci++) {
constr = classes[ci];
constrProto = constr.prototype;
if (constrProto.hasOwnProperty(DESTRUCTOR)) {
constrProto.destructor.apply(this, arguments);
}
}
},
/**
* Default toString implementation. Provides the constructor NAME
* and the instance ID.
*
* @method toString
* @return {String} String representation for this object
*/
toString: function() {
return this.constructor.NAME + "[" + Y.stamp(this) + "]";
}
};
// Straightup augment, no wrapper functions
Y.mix(Base, Y.Attribute, false, null, 1);
Y.mix(Base, PluginHost, false, null, 1);
/**
* Alias for <a href="PluginHost.html#method_PluginHost.plug">PluginHost.plug</a>.
*
* @method Base.plug
* @static
*/
Base.plug = PluginHost.plug;
/**
* Alias for <a href="PluginHost.html#method_PluginHost.unplug">PluginHost.unplug</a>.
*
* @method Base.unplug
* @static
*/
Base.unplug = PluginHost.unplug;
// Fix constructor
Base.prototype.constructor = Base;
Y.Base = Base;
}, '@VERSION@' ,{requires:['attribute']});