diff options
| author | winter | 2024-12-06 20:43:26 +0000 |
|---|---|---|
| committer | winter | 2024-12-06 20:43:26 +0000 |
| commit | e1ad307b531c27ec6bfaf8b4d018991b0d4a78f3 (patch) | |
| tree | 4ef08af2b4051d433bb929d5162474ac6777cab1 /WpfTest/GlobalConfig.php | |
initial commit
hardcoded functionality mostly!
Diffstat (limited to 'WpfTest/GlobalConfig.php')
| -rw-r--r-- | WpfTest/GlobalConfig.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/WpfTest/GlobalConfig.php b/WpfTest/GlobalConfig.php new file mode 100644 index 0000000..4bbfe68 --- /dev/null +++ b/WpfTest/GlobalConfig.php @@ -0,0 +1,25 @@ +<?php +namespace WpfTest; + +class GlobalConfig { + private static GlobalConfig $instance; + + private function __construct() { + + } + + public static function getInstance() { + if (!isset(self::$instance)) { + self::$instance = new self(); + } + return self::$instance; + } + + public function getCanonicalHost(): string { + return $_SERVER['HTTP_HOST']; // for now this is fine + } + + public function getBasePath(): string { + return 'http://' . $this->getCanonicalHost(); // fix this? + } +}
\ No newline at end of file |
