An augmentable class, which provides the augmented class with the ability to host plugins. It adds plug and unplug methods to the augmented class, which can be used to add or remove plugins from instances of the class.
Plugins can also be added through the constructor configuration object passed to the host class' constructor using the "plugins" property. Supported values for the "plugins" property are those defined by the plug method. For example the following code would add the AnimPlugin and IOPlugin to Overlay (the plugin host):
Unplugs and destroys all plugins on the host
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.
Initializes static plugins registered on the host (using the Base.plug static method) and any plugins passed to the instance through the "plugins" configuration property.
Determines if a plugin has plugged into this host.
Adds a plugin to the host object. This will instantiate the plugin and attach it to the configured namespace on the host object.
PFunction | Object | Array
Registers plugins to be instantiated at the class level (plugins which should be plugged into every instance of the class by default).
Removes a plugin from the host object. This will destroy the plugin instance and delete the namepsace from the host object.
Unregisters any class level plugins which have been registered by the host class, or any other class in the hierarchy.
This project is kindly supported by Creative Agency, Imaginaire Digital in Nottingham, UK.