Class: Bootstrap
Defined in: packages/core/src/Bootstrap.ts:123
Application bootstrap used to initialize the environment and the application itself.
Constructors
new Bootstrap()
new Bootstrap(
oc
):Bootstrap
Defined in: packages/core/src/Bootstrap.ts:133
Initializes the bootstrap.
Parameters
oc
The application's object container to use for managing dependencies.
Returns
Properties
_config
protected
_config:BootConfig
Defined in: packages/core/src/Bootstrap.ts:125
_oc
protected
_oc:ObjectContainer
Defined in: packages/core/src/Bootstrap.ts:124
Methods
_bindDependencies()
_bindDependencies():
void
Defined in: packages/core/src/Bootstrap.ts:266
Binds the constants, service providers and class dependencies to the object container.
Returns
void
_bindPluginDependencies()
_bindPluginDependencies(
name
,plugin
):void
Defined in: packages/core/src/Bootstrap.ts:298
Binds the constants, service providers and class dependencies to the object container for dynamically imported plugins.
Parameters
name
string
Plugin name.
plugin
Plugin interface (object with init functions).
Returns
void
_initPluginServices()
_initPluginServices(
plugin
):void
Defined in: packages/core/src/Bootstrap.ts:336
Service initialization for the dynamically loaded plugins.
Parameters
plugin
Plugin interface (object with init functions).
Returns
void
_initPluginSettings()
_initPluginSettings(
name
,plugin
):void
Defined in: packages/core/src/Bootstrap.ts:230
Initializes dynamically loaded plugin settings (if the init function is provided). The settings are merged into the application the same way as with non-dynamic import, meaning the app setting overrides are prioritized over the default plugin settings.
Parameters
name
string
Plugin name.
plugin
Plugin interface (object with init functions).
Returns
void
_initRoutes()
_initRoutes():
void
Defined in: packages/core/src/Bootstrap.ts:311
Initializes the routes.
Returns
void
_initServices()
_initServices():
void
Defined in: packages/core/src/Bootstrap.ts:319
Initializes the basic application services.
Returns
void
_initSettings()
_initSettings():
void
Defined in: packages/core/src/Bootstrap.ts:186
Initializes the application settings. The method loads the settings for all environments and then picks the settings for the current environment.
The method also handles using the values in the production environment as default values for configuration items in other environments.
Returns
void
initPlugin()
initPlugin(
name
,plugin
?):void
Defined in: packages/core/src/Bootstrap.ts:169
Initializes dynamically loaded plugin. This is explicitly called from within the Plugin Loader instance.
Parameters
name
string
Plugin name.
plugin?
Plugin interface (object with init functions).
Returns
void
run()
run(
config
):void
Defined in: packages/core/src/Bootstrap.ts:153
Initializes the application by running the bootstrap sequence. The sequence initializes the components of the application in the following order:
- application settings
- constants, service providers and class dependencies configuration
- services
- UI components
- routing
Parameters
config
The application environment configuration for the current environment.
Returns
void