Router.class.Base Class
Item Index
Properties
Events
Methods
_addEvent
-
eventName
-
funct
-
scope
use .on()
Parameters:
-
eventName
Stringsingular or comma separated
-
funct
Function -
scope
Object
_cloneListener
-
function
create a copy of the listener for each class
Parameters:
-
function
Function
Returns:
fireEvent
-
eventName
-
args
Fire an event on this object
Parameters:
-
eventName
Stringname of the event to fire
-
args
Any...(optional)
Returns:
eventObject
getId
()
String
Returns:
uniqueId
init
()
Returns:
self
off
-
eventName
-
callback
remove a listener that was registered with .on()
Parameters:
-
eventName
String -
callback
Functionthe function that was used when registering the event with .on()
Returns:
on
-
eventName
-
callback
-
scope
register a listener to this object class, when the object fires a specific event
Parameters:
-
eventName
String -
callback
Function -
scope
Object(optional)
Returns:
self
Example:
on("someEvent", callback)
on({
"someevent": callback, //comma separate event names for the same callback
"someotherevent": callback1,
scope: this
})
Properties
_idPrefix
String
private
autoDestroy
Boolean
controls which data will be destoryed
Default: true
classReadyEvent
String
Default: "ready"
id
String
private
use Firebrick.class.Base:getId
initialConfig
Object
when calling Firebrick.create("xxx", {}); the second parameter {} (config) is stored in this property as a reference
- in case one needs to know with what paramters the object was intialised with
Default: null
listeners
Object map
shorthand for defining class listeners so you don't have to create the init function and use this.on()
Example:
listeners:{
"ready": function(){},
scope:this
}
localEventRegistry
Object map
private
event registry
mixedIn
Object
private
reference for mixins that have been mixed in. works only if "mixins" is a String or array or strings
Default: : null
mixins
String | Object | String
Default: null
sName
String
use this give the class a shortname to reference Firebrick.get(sname) is also possible if this property is defined
Default: null
Events
destroy
remove class from registry