PluginHostConfig.js revision 1e467ec3dfebabf9895552c6e7e85d4660a18969
/**
* Adds pluginhost constructor configuration and static configuration support
* @submodule pluginhost-config
*/
L = Y.Lang;
/**
* A protected initialization method, used by the host class to initialize
* plugin configurations passed the constructor, through the config object.
*
* Host objects should invoke this method at the appropriate time in their
* construction lifecycle.
*
* @method _initConfigPlugins
* @param {Object} config The configuration object passed to the constructor
* @protected
* @for Plugin.Host
*/
// Class Configuration
plug = [],
unplug = {},
// TODO: Room for optimization. Can we apply statically/unplug in same pass?
constructor = classes[i];
if (classUnplug) {
// subclasses over-write
}
if (classPlug) {
// subclasses over-write
}
}
for (pluginClassName in plug) {
if (!unplug[pluginClassName]) {
}
}
}
// User Configuration
}
};
/**
* Registers plugins to be instantiated at the class level (plugins
* which should be plugged into every instance of the class by default).
*
* @method Plugin.Host.plug
* @static
*
* @param {Function} hostClass The host class on which to register the plugins
* @param {Function | Array} plugin Either the plugin class, an array of plugin classes or an array of objects (with fn and cfg properties defined)
* @param {Object} config (Optional) If plugin is the plugin class, the configuration for the plugin
*/
// Cannot plug into Base, since Plugins derive from Base [ will cause infinite recurrsion ]
var p, i, l, name;
if (config) {
}
}
p = plugin[i];
}
}
};
/**
* Unregisters any class level plugins which have been registered by the host class, or any
* other class in the hierarchy.
*
* @method Plugin.Host.unplug
* @static
*
* @param {Function} hostClass The host class from which to unregister the plugins
* @param {Function | Array} plugin The plugin class, or an array of plugin classes
*/
var p, i, l, name;
}
p = plugin[i];
} else {
}
}
}
};