PHP Class Webiny\Component\Bootstrap\Environment

Detects current environment and loads the appropriate configurations.
Inheritance: use trait Webiny\Component\StdLib\SingletonTrait, use trait Webiny\Component\Config\ConfigTrait, use trait Webiny\Component\Http\HttpTrait, use trait Webiny\Component\StdLib\StdObjectTrait
Mostrar archivo Open project: Webiny/Framework Class Usage Examples

Public Methods

Method Description
getApplicationAbsolutePath ( ) : string Get the current application absolute path.
getApplicationConfig ( ) : ConfigObject Get current application configuration.
getComponentConfigs ( ) : ConfigObject Get all loaded configurations.
getCurrentEnvironmentConfig ( ) : ConfigObject Get application config based on the current environment.
getCurrentEnvironmentName ( ) : string Get the name of the current loaded environment.
initializeEnvironment ( string $applicationAbsolutePath ) Initializes the environment and loads all the configurations from it.

Private Methods

Method Description
initializeComponentConfigurations ( ) Initializes component configurations.
initializeEnvironmentInternal ( ) Initializes current environment.
loadApplicationConfig ( ) Loads application configuration.
loadConfigurations ( string $environment ) : ConfigObject Loads all the configurations from a specific environment.
registerAppNamespace ( ) Registers the application namespace with the ClassLoader component.
setErrorReporting ( ) Sets the error reporting based on the environment.

Method Details

getApplicationAbsolutePath() public method

Get the current application absolute path.

getApplicationConfig() public method

Get current application configuration.
public getApplicationConfig ( ) : ConfigObject
return Webiny\Component\Config\ConfigObject

getComponentConfigs() public method

Get all loaded configurations.
public getComponentConfigs ( ) : ConfigObject
return Webiny\Component\Config\ConfigObject

getCurrentEnvironmentConfig() public method

Get application config based on the current environment.
public getCurrentEnvironmentConfig ( ) : ConfigObject
return Webiny\Component\Config\ConfigObject

getCurrentEnvironmentName() public method

Get the name of the current loaded environment.

initializeEnvironment() public method

Initializes the environment and loads all the configurations from it.
public initializeEnvironment ( string $applicationAbsolutePath )
$applicationAbsolutePath string Absolute path to the root of the application.