private function configure()
{
$this->importEnvironmentVariables();
$this->config['root'] = $this->getTerminusRoot();
$this->config['php'] = $this->getPhpBinary();
$this->config['php_version'] = PHP_VERSION;
$this->config['php_ini'] = get_cfg_var('cfg_file_path');
$this->config['script'] = $this->getTerminusScript();
$this->config['os_version'] = php_uname('v');
$file_config = Yaml::parse(file_get_contents($this->config['root'] . $this->config_path));
foreach ($file_config as $name => $setting) {
$key = $this->getKeyFromConstant($name);
if (isset($this->config[$key])) {
continue;
} elseif (defined($name)) {
$setting = constant($name);
} elseif (isset($_SERVER[$name]) && $_SERVER[$name] != '') {
$setting = $_SERVER[$name];
} elseif (getenv($name)) {
$setting = getenv($name);
}
$value = $this->replacePlaceholders($setting);
$this->ensureDirExists($name, $value);
$this->config[$key] = $value;
}
// TODO: revisit this: it seems that Terminus configuration
// should not override the timezone set in php.ini.
// date_default_timezone_set($this->get('time_zone'));
}