From 50bde319a7fcc65dcdd65d93934c10458573bfac Mon Sep 17 00:00:00 2001 From: DavidDevGt Date: Sun, 10 Nov 2024 03:08:11 -0600 Subject: [PATCH] =?UTF-8?q?Agregar=20m=C3=A9todos=20para=20obtener=20la=20?= =?UTF-8?q?configuraci=C3=B3n=20de=20la=20base=20de=20datos=20y=20el=20niv?= =?UTF-8?q?el=20de=20registro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Infrastructure/Config/Config.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/Infrastructure/Config/Config.php b/app/Infrastructure/Config/Config.php index f61728d..20689e1 100644 --- a/app/Infrastructure/Config/Config.php +++ b/app/Infrastructure/Config/Config.php @@ -11,4 +11,21 @@ class Config $dotenv = Dotenv::createImmutable(__DIR__ . '/../../../'); $dotenv->load(); } + + public static function getDatabaseConfig(): array + { + return [ + 'database_type' => getenv('DB_TYPE'), + 'database_name' => getenv('DB_NAME'), + 'server' => getenv('DB_HOST'), + 'username' => getenv('DB_USER'), + 'password' => getenv('DB_PASS'), + 'port' => getenv('DB_PORT') + ]; + } + + public static function getLogLevel(): string + { + return getenv('LOG_LEVEL') ?: 'info'; + } } \ No newline at end of file