Provides methods that simplify the task of creating classes.
n/a
This component adds the following method to the V$.Class object.
Creates a new class, i.e. returns the function that represents the class.
A class object has the following methods. Please note that none of these methods will be inherited by an objects created from the class because they are properties of the class object and not its prototype.
Adds the functions defined in the Map of methods to the prototype of the selected class.
Parameter | Description | Type |
---|---|---|
m | The Map of methods (functions) to add to the class. | Methods |
Calls methods(c.prototype). Please note that mixin classes must not provide initialize(), it is an error if c.prototype.initialize is defined.
Parameter | Description | Type |
---|---|---|
c | The class from whose prototype the methods will be added to this class's prototype. | Class |
The mixin(c) method should be used instead of the mixin(sourceClass, targetClass) method provided by the cf2:Mixins component.