adjust the development environment

This commit is contained in:
kmvan
2020-01-31 17:42:19 +08:00
parent 352dac7626
commit 0021c08102
10 changed files with 46 additions and 19 deletions

View File

@@ -6,13 +6,15 @@ class ConfigGeneration
{
private $phpConfigPath = '';
private $configPath = '';
private $configPath = '';
private $configPathDev = '';
public function __construct(array $args)
{
[
'phpConfigPath' => $this->phpConfigPath,
'configPath' => $this->configPath,
'configPathDev' => $this->configPathDev,
] = $args;
if ( ! \is_file($this->configPath)) {
@@ -23,9 +25,16 @@ class ConfigGeneration
$this->die('Error: can not generate content to dist.');
}
$this->copyConfigToTmp();
$this->die('PHP config file generated successful.', false);
}
private function copyConfigToTmp(): bool
{
return \copy($this->configPathDev, $this->configPath);
}
private function genPhpConfig(): bool
{
$config = \file_get_contents($this->configPath) ?: '';