Menu
©2015
Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2015-1-16 18:32

Class puredom.ControllerManager

Class Summary
Constructor Attributes Constructor Name and Description
 
Manages controllers, providing a means for separating functionality into feature-centric modules.
Field Summary
Field Attributes Field Name and Description
 
Options to pass to every controller.

Method Summary

Method Attributes Method Name and Description
 
current ()
Get a reference to the current controller if it exists.
 
destroy ()
Destroy the registry.
 
get (name, returnIndex)
Get the definition for a given named controller.
 
getList (properties)
Get a list of registered controllers
 
init (options)
Initialize the registry.
 
load (name, options)
Load the given named module.
 
loadDefault (options)
Load the default module (the module with isDefault=true).
 
loadPrevious (options)
Load the controller that was previously loaded.
 
none ()
Unload the current controller if one exists.
 
postMessage (type, msgObj)
Post a message to the current controller if it exists.
 
register (name, controller)
Register a named module.
 
Reload the current controller if one exists.

Class Detail

puredom.ControllerManager(options)
Manages controllers, providing a means for separating functionality into feature-centric modules.
Parameters:
{Object} options Optional
Hash of options to be given to the instance.

Field Detail

controllerOptions
Options to pass to every controller.

Method Detail

  • current()
    Get a reference to the current controller if it exists.
  • destroy()
    Destroy the registry.
  • get(name, returnIndex)
    Get the definition for a given named controller.
    Parameters:
    {String} name
    The controller name to find
    {Boolean} returnIndex Optional, Default: false
    If true, returns the index instead of a reference.
  • {Array} getList(properties)
    Get a list of registered controllers
    Parameters:
    {Array} properties Optional
    Other properties to include in the list from each controller.
    Returns:
    {Array} controllerList
  • init(options)
    Initialize the registry.
    Parameters:
    {Any}options
  • load(name, options)
    Load the given named module.
    Parameters:
    {Any}name
    {Any}options
  • {Boolean} loadDefault(options)
    Load the default module (the module with isDefault=true).
    Parameters:
    {Any}options
    Returns:
    {Boolean} defaultWasLoaded
  • loadPrevious(options)
    Load the controller that was previously loaded.
    Note: This is not actual history, it only remembers one item.
    Parameters:
    {Any}options
  • none()
    Unload the current controller if one exists.
  • postMessage(type, msgObj)
    Post a message to the current controller if it exists.
    Parameters:
    {Any}type
    {Any}msgObj
  • register(name, controller)
    Register a named module.
    Parameters:
    {Any}name
    {Any}controller
  • reloadCurrent()
    Reload the current controller if one exists.