Class: Context

Context

A context used by IoC to register and request objects from. This is the main class for the inversion of control framework. It serves as a registry where you can add {ObjectDefinition}s and request instances from them.


new Context()

Methods


<static> getConfig(key)

Get an element from the configuration. Can be both a leaf of the configuration, or an intermediate path. In the latter case it will return an object with all the configs under that path. It will throw an exception if the key doesn't exist.

Parameters:
Name Type Description
key

The key of the config we want

See:
Throws:

If the given key doesn't exist

Type
Error
Returns:

The requested configuration

Type
*

<static> hasConfig(key)

Indicates whether a given key exists in the configuration

Parameters:
Name Type Description
key
Returns:
Type
*