This commit is contained in:
2026-03-02 22:52:55 +01:00
parent 98866fd19b
commit 610c153e25
2 changed files with 128 additions and 0 deletions

View File

@@ -6,12 +6,18 @@ namespace App;
class Config
{
public string $assetVersion;
public bool $dbAutoInit;
public ?string $dbInitScript;
public ?string $dbInitCmd;
public function __construct(
public array $db,
public bool $dbEnabled = true
) {
$this->assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : '';
$this->dbAutoInit = defined('APP_DB_AUTO_INIT') ? (bool)APP_DB_AUTO_INIT : false;
$this->dbInitScript = defined('APP_DB_INIT_SCRIPT') ? (string)APP_DB_INIT_SCRIPT : null;
$this->dbInitCmd = defined('APP_DB_INIT_CMD') ? (string)APP_DB_INIT_CMD : null;
}
public function primaryUrl(): string