klyn.di.DIContext.registerComponent
method

    public registerComponent(name as String, component as Object) as Void:

Description

Registers a component instance under a name.

Parameters

Parameter | Description
--- | ---
`name` | Lookup name used to retrieve the component.
`component` | Component instance to store.

Example

    import klyn.di

    context = DIContext()
    context.registerComponent("service", Object())
    assert context.getComponent("service") is Object