Bootstrap

Bootstrap~ Bootstrap

Application bootstrap used to initialize the environment and the application itself.

Constructor

new Bootstrap(oc)

Source:
Initializes the bootstrap.
Parameters:
Name Type Description
oc ObjectContainer The application's object container to use for managing dependencies.

Members

_config :Object.<string, *>

Source:
Application configuration.
Type:
  • Object.<string, *>

_oc :ObjectContainer

Source:
The object container used to manage dependencies.
Type:
  • ObjectContainer

Methods

_bindDependencies()

Source:
Binds the constants, service providers and class dependencies to the object container.

_getEnvironmentSetting() → {Object.<string, *>}

Source:
Returns setting for current environment where base values are from production environment and other environments override base values.
Returns:
Type
Object.<string, *>

_initRoutes()

Source:
Initializes the routes.

_initServices()

Source:
Initializes the basic application services.

_initSettings()

Source:
Initializes the application settings. The method loads the settings for all environments and then pics 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.

run(config)

Source:
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:
Name Type Description
config Object.<string, *> The application environment configuration for the current environment.