ComponentUtils 

Kind: global class


new ComponentUtils(oc) 

Initializes the registry used for managing component utils.

Param Type Description
oc ObjectContainer The application’s dependency injector - the object container.

componentUtils._oc : ObjectContainer 

The application’s dependency injector - the object container.

Kind: instance property of ComponentUtils


componentUtils._utilityClasses : Object.<string, (function(new:T, ...\*)\|function(...\*): T)> 

Map of registered utilities.

Kind: instance property of ComponentUtils


componentUtils._utilities : Object.<string, Object> 

Map of instantiated utilities

Kind: instance property of ComponentUtils


componentUtils._utilityReferrers : Object.<string, string> 

Map of referrers to utilities

Kind: instance property of ComponentUtils


componentUtils.register(name, componentUtilityClass, referrer) 

Registers single utility class or multiple classes in alias->class mapping.

Kind: instance method of ComponentUtils

Param Type Default
name string | Object.<string, (function(new:T, ...\*)\|function(...\*): T)>  
componentUtilityClass function | function  
referrer string null

componentUtils.getUtils() ⇒ Object.<string, Object> 

Returns object containing all registered utilities

Kind: instance method of ComponentUtils


componentUtils.getReferrers() ⇒ Object.<string, string> 

Kind: instance method of ComponentUtils


componentUtils._createUtilityInstance(alias, utilityClass) ⇒ T 

Kind: instance method of ComponentUtils

Param Type
alias string
utilityClass function | function