Core API
The kermit core api description
Config
The config class with support for merging multiple hashes recursively and retrieving a nested key by its dot separated string representation.
since 1.2.0
Methods
- public constructor()
- public setConfig([Object config, ...]) : Config
- public mergerConfig(Object config) : Config
- public get(string key[, * defaultValue]) : *
- public getHash() : Object
- private _getConfigType(* value) : string
- private _mergerConfig(Object dest, Object src) : Object
Service
Methods
- public constructor([ServiceManager serviceManager])
- public getServiceManager() : ServiceManager
- public setServiceManager(ServiceManager serviceManager) : Service
- public configure([Object config]) : Service
- public bootstrap() : Service
- public launch() : Service
- public getDefaultConfig() : Object|false
- private _applyConfig([Object config]) : Service
ConfigService
Methods
- public constructor(ServiceManager serviceManager)
- public configure(Object config) : ConfigService
- public launch() : ConfigService
- public getFiles() : Array
- public setFiles(Array files) : ConfigService
- public readConfig() : ConfigService
- public getConfig() : Object
- public setConfig([Object config, ...]) : ConfigService
- public get(string key[, * defaultValue]) : *
ServiceManager
The service manager class that holds the registry of services.
since 0.1.0
Config
Strict mode of the service manager may be enabled globally by setting the service-manager.strictMode
application config to true.
Methods
- public constructor()
- public get(string key[, boolean strict]) : Service
- public set(string key, Service service[, boolean strict]) : ServiceManager
- public remove(string key [, boolean strict]) : ServiceManager
- public has(string key) : ServiceManager
Application
The kermit application class is a Service, that manages dependent services, their life-cycle and their configuration in the ServiceManager.
extends Service
since 0.3.0
Methods
- public constructor(ServiceManager serviceManager) ⭢
- public configure(Object config) : Application
- public bootstrap() : Application
- public launch() : Application
- public getConfigService() : ConfigService
- public setConfigService(ConfigService configService) : Application
- public getDefaultServiceConfig() : Object|false
- public getServiceManager() : ServiceManager
- public setServiceManager(ServiceManager serviceManager) : Application
- protected _loadService(string servicePath) : Service
Application.constructor([ServiceManager serviceManager])
Parameters
- ServiceManager serviceManager - The service manager instance. (optional)
Description
Create a new application instance.
Updated less than a minute ago