|
@@ 1100-1102 (lines=3) @@
|
| 1097 |
|
if (file_exists($config_yml)) { |
| 1098 |
|
$config = Yaml::parse(file_get_contents($config_yml)); |
| 1099 |
|
$config = empty($config) ? array() : $config; |
| 1100 |
|
if (isset($this['output_config_php']) && $this['output_config_php']) { |
| 1101 |
|
file_put_contents($config_php, sprintf('<?php return %s', var_export($config, true)).';'); |
| 1102 |
|
} |
| 1103 |
|
} |
| 1104 |
|
} else { |
| 1105 |
|
$config = require $config_php; |
|
@@ 1114-1116 (lines=3) @@
|
| 1111 |
|
$config_yml_dist = $distPath.'/'.$config_name.'.yml.dist'; |
| 1112 |
|
if (file_exists($config_yml_dist)) { |
| 1113 |
|
$config_dist = Yaml::parse(file_get_contents($config_yml_dist)); |
| 1114 |
|
if (isset($this['output_config_php']) && $this['output_config_php']) { |
| 1115 |
|
file_put_contents($config_php_dist, sprintf('<?php return %s', var_export($config_dist, true)).';'); |
| 1116 |
|
} |
| 1117 |
|
} |
| 1118 |
|
} else { |
| 1119 |
|
$config_dist = require $config_php_dist; |