mirror of
https://github.com/kmvan/x-prober.git
synced 2026-04-22 01:08:59 +08:00
adjust the development environment
This commit is contained in:
@@ -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) ?: '';
|
||||
|
||||
Reference in New Issue
Block a user