PHP Класс Webiny\Component\Bootstrap\Environment

Detects current environment and loads the appropriate configurations.
Наследование: use trait Webiny\Component\StdLib\SingletonTrait, use trait Webiny\Component\Config\ConfigTrait, use trait Webiny\Component\Http\HttpTrait, use trait Webiny\Component\StdLib\StdObjectTrait
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

getApplicationAbsolutePath() публичный метод

Get the current application absolute path.
public getApplicationAbsolutePath ( ) : string
Результат string

getApplicationConfig() публичный метод

Get current application configuration.
public getApplicationConfig ( ) : ConfigObject
Результат Webiny\Component\Config\ConfigObject

getComponentConfigs() публичный метод

Get all loaded configurations.
public getComponentConfigs ( ) : ConfigObject
Результат Webiny\Component\Config\ConfigObject

getCurrentEnvironmentConfig() публичный метод

Get application config based on the current environment.
public getCurrentEnvironmentConfig ( ) : ConfigObject
Результат Webiny\Component\Config\ConfigObject

getCurrentEnvironmentName() публичный метод

Get the name of the current loaded environment.
public getCurrentEnvironmentName ( ) : string
Результат string

initializeEnvironment() публичный метод

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