1 | <?php |
||
20 | final class Domain |
||
21 | { |
||
22 | const DEFAULT_DOMAIN = 'default'; |
||
23 | |||
24 | private $domain; |
||
25 | |||
26 | /** |
||
27 | * Domain constructor. |
||
28 | * @param $domain |
||
29 | */ |
||
30 | public function __construct(string $domain = null) |
||
37 | |||
38 | /** |
||
39 | * @return string |
||
40 | */ |
||
41 | public function domain() : string |
||
45 | |||
46 | public function toString() : string |
||
50 | |||
51 | public function __toString() : string |
||
55 | |||
56 | private function detectDomain() : string |
||
74 | } |
||
75 |