protected function loadEnvironmentConfiguration()
{
$configs = array();
if (!$this->environmentVariable) {
return $configs;
}
$this->debugInformation['environment_variable_name'] = $this->environmentVariable;
if ($envConfig = getenv($this->environmentVariable)) {
$config = @json_decode($envConfig, true);
$this->debugInformation['environment_variable_content'] = $envConfig;
if (!$config) {
throw new ConfigurationLoadingException(sprintf('Environment variable `%s` should contain a valid JSON, but it is set to `%s`.', $this->environmentVariable, $envConfig));
}
$configs[] = $config;
}
return $configs;
}