This commit is contained in:
2025-04-25 20:46:09 -04:00
parent 9bdecb1455
commit e84c7cf9ad
11 changed files with 2056 additions and 55 deletions

View File

@@ -1,32 +0,0 @@
<?php
declare(strict_types=1);
namespace Siteworxpro\App\Helpers;
use Psr\Log\LogLevel;
use Siteworxpro\App\Facades\Config as FacadeConfig;
class Config
{
private const array DEFAULTS = [
FacadeConfig::DB_DRIVER => 'pgsql',
FacadeConfig::DB_HOST => 'localhost',
FacadeConfig::DB_DATABASE => 'siteworx',
FacadeConfig::DB_USER => 'siteworx',
FacadeConfig::DB_PASSWORD => 'password',
FacadeConfig::LOG_LEVEL => LogLevel::DEBUG,
FacadeConfig::HTTP_PORT => '9501',
FacadeConfig::DEV_MODE => true,
];
/**
* @param string $key
* @param string $castTo
* @return string|int|bool|float
*/
public function get(string $key, string $castTo = 'string'): string|int|bool|float
{
return Env::get($key, self::DEFAULTS[$key] ?? null, $castTo);
}
}