CoreBase
Extends:
Main class for OS.js service providers and bootstrapping.
Constructor Summary
Public Constructor | ||
public |
constructor(defaultConfiguration: Object, configuration: Object, options: Object) Create core instance |
Method Summary
Public Methods | ||
public |
boot(): * Boots up OS.js |
|
public |
Gets a configuration entry by key |
|
public |
destroy(): * Destroy core instance |
|
public |
Check if a service exists |
|
public |
Register a instanciator provider |
|
public |
Create an instance of a provided service |
|
public |
Register a service provider |
|
public |
Register a singleton provider |
|
public |
start(): * Starts all core services |
Public Constructors
Public Methods
public config(key: String, defaultValue: *): * source
Gets a configuration entry by key
Params:
Name | Type | Attribute | Description |
key | String | The key to get the value from |
|
defaultValue | * |
|
If result is undefined, return this instead |
Return:
* |
public has(name: String): Boolean source
Check if a service exists
Params:
Name | Type | Attribute | Description |
name | String | Provider name |
public make(name: String, args: *): * source
Create an instance of a provided service
Params:
Name | Type | Attribute | Description |
name | String | Service name |
|
args | * | Constructor arguments |
Return:
* | An instance of a service |