From f81b0451b431b70b832bb4b82482ce8b8589d4c1 Mon Sep 17 00:00:00 2001 From: tracer Date: Wed, 21 Sep 2022 16:00:16 +0200 Subject: [PATCH] added quiet option --- src/Controller/ConfigController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Controller/ConfigController.php b/src/Controller/ConfigController.php index 31165e1..7179fad 100644 --- a/src/Controller/ConfigController.php +++ b/src/Controller/ConfigController.php @@ -9,7 +9,7 @@ class ConfigController { 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"; if (!file_exists(filename: $configFile)) { $configFile = dirname(path: __DIR__, levels: 2) . "/config.json"; @@ -41,6 +41,11 @@ class ConfigController } else { $this->config['verbose'] = false; } + if ($quiet) { + $this->config['quiet'] = true; + } else { + $this->config['quiet'] = false; + } } public function getConfig(string $configKey): string {