blob: 4bbfe68f1392e2bff439d5ba6b9b8914d3336dc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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?
}
}
|