added quiet option
This commit is contained in:
parent
9474a9ebef
commit
f81b0451b4
|
@ -9,7 +9,7 @@ class ConfigController
|
||||||
{
|
{
|
||||||
private array $config;
|
private array $config;
|
||||||
|
|
||||||
public function __construct(bool $verbose = false) {
|
public function __construct(bool $verbose = false, bool $quiet = false) {
|
||||||
$configFile = dirname(path: __DIR__, levels: 2) . "/config.json.local";
|
$configFile = dirname(path: __DIR__, levels: 2) . "/config.json.local";
|
||||||
if (!file_exists(filename: $configFile)) {
|
if (!file_exists(filename: $configFile)) {
|
||||||
$configFile = dirname(path: __DIR__, levels: 2) . "/config.json";
|
$configFile = dirname(path: __DIR__, levels: 2) . "/config.json";
|
||||||
|
@ -41,6 +41,11 @@ class ConfigController
|
||||||
} else {
|
} else {
|
||||||
$this->config['verbose'] = false;
|
$this->config['verbose'] = false;
|
||||||
}
|
}
|
||||||
|
if ($quiet) {
|
||||||
|
$this->config['quiet'] = true;
|
||||||
|
} else {
|
||||||
|
$this->config['quiet'] = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getConfig(string $configKey): string {
|
public function getConfig(string $configKey): string {
|
||||||
|
|
Loading…
Reference in New Issue