Ankh

ComponentModel

function
ComponentModel()

Describes the model for resolving a service

function ComponentModel(key, impl, cfg) {
    this.key = key

impl

property
this.impl

this.impl =impl
this._cfg = cfg || {}

inject

property
this.inject

this.inject = (this.impl.inject || [])

initializable

property
this.initializable

this.initializable = (this.impl.initializable || false)

startable

property
this.startable

this.startable = (this.impl.startable || false)
}

resolver

method
ComponentModel.prototype.resolver()

Option name Type Description
[val] String

When provided, acts as a setter for the resolver

return String

The key for the resolver to use

get/set the resolver service key

ComponentModel.prototype.resolver = function(val) {
    if(val) {
        this._resolver = val
    }
    return this._resolver
}

activator

method
ComponentModel.prototype.activator()

Option name Type Description
[val] String

When provided, acts as a setter for the activator

return String

The key for the activator to use

get/set the activator service key

ComponentModel.prototype.activator = function(val) {
    if(val) {
        this._activator = val
    }
    return this._activator
}