new Class(options)
Class
Extendable base class from which all others extend
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Object containing initialisation options |
Members
supro
Similar to `super` in ActionScript or Java, this property enables
you to access properties and methods of the super class prototype,
which is the case of JavaScript is the next prototype up the chain
Methods
(static) extend(protoPropsopt, staticPropsopt)
Extend this class to create a new class
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
protoProps |
Object |
<optional> |
Object containing the new class's prototype |
staticProps |
Object |
<optional> |
Object containing the new class's static methods and properties |
Example
var MyClass = conbo.Class.extend
({
doSomething:function()
{
conbo.log(':-)');
}
});
(static) implement(…interface)
Implements the specified pseudo-interface(s) on the class, copying
the default methods or properties from the partial(s) if they have
not already been implemented.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
interface |
Object |
<repeatable> |
Object containing one or more properties or methods to be implemented (an unlimited number of parameters can be passed) |
Example
var MyClass = conbo.Class.extend().implement(conbo.IInjectable);
bindAll(…methodNameopt) → {this}
Scope all methods of this class instance to this class instance
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
methodName |
string |
<optional> <repeatable> |
Specific method names to bind (all will be bound if none specified) |
Returns:
- Type
- this
declarations() → {void}
Declarations is used to declare instance properties used by this class
Parameters:
Type | Attributes | Description |
---|---|---|
* |
<repeatable> |
Returns:
- Type
- void
destroy() → {void}
Clean everything up ready for garbage collection (you should override in your own classes)
Returns:
- Type
- void
initialize() → {void}
Initialize (entry point) is called immediately after the constructor has completed
Parameters:
Type | Attributes | Description |
---|---|---|
* |
<repeatable> |
Returns:
- Type
- void
preinitialize() → {void}
Preinitialize is called before any code in the constructor has been run
Parameters:
Type | Attributes | Description |
---|---|---|
* |
<repeatable> |
Returns:
- Type
- void
toString() → {string}
String representation of the current class
Returns:
- Type
- string