From 4c7bde1400820f36caf8b2a5374007384c3018f3 Mon Sep 17 00:00:00 2001 From: winter Date: Mon, 9 Dec 2024 21:31:54 +0000 Subject: rename to Digitigrade / PawPub :3 --- WpfTest/GlobalConfig.php | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 WpfTest/GlobalConfig.php (limited to 'WpfTest/GlobalConfig.php') diff --git a/WpfTest/GlobalConfig.php b/WpfTest/GlobalConfig.php deleted file mode 100644 index 4601257..0000000 --- a/WpfTest/GlobalConfig.php +++ /dev/null @@ -1,44 +0,0 @@ -confData = parse_ini_file(self::CONFIG_INI_PATH, process_sections: true); - } - - public function getCanonicalHost(): string { - $host = $this->confData['instance']['hostname']; - if (isset($this->confData['instance']['port']) && $this->confData['instance']['port'] != ($this->isHttps() ? 443 : 80)) - $host .= ':' . $this->confData['instance']['port']; - return $host; - } - - public function isHttps(): bool { - return $this->confData['debug']['https'] ?? true; - } - - public function getBasePath(): string { - return ($this->isHttps() ? 'https://' : 'http://') . $this->getCanonicalHost(); - } - - public function shouldReportTraces(): bool { - return $this->confData['debug']['send_tracebacks'] ?? false; - } - - public function getDbConnection(): string { - return 'pgsql:host=' . $this->confData['database']['host'] . - ';port=' . $this->confData['database']['port'] . - ';dbname=' . $this->confData['database']['database']; - } - - public function getDbUser(): string { - return $this->confData['database']['username']; - } - - public function getDbPassword(): string { - return $this->confData['database']['password']; - } -} \ No newline at end of file -- cgit v1.3