Creates a constructor with given prototype
Parameters:
| Name |
Type |
Description |
proto |
Object
|
|
- Source:
Returns:
ctor
-
Type
-
Class
Example
Utils.createClass({
displayName: "MyClass", // ctor.displayName
// Array of objects to mix-into prototype
mixins: [
Marbles.State
],
parentClass: MyOtherClass, // inherit from MyOtherClass (optional)
willInitialize: function () {}, // called before parent ctor is called
didInitialize: function () {}, // called after parent ctor is called
myProperty: 123 // no special meaning
});