| 1 | <?php |
||
| 17 | class OriginValidator |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var OriginValidator |
||
| 21 | */ |
||
| 22 | static private $instance = null; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var Hostname |
||
| 26 | */ |
||
| 27 | private $validator; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * DomainNameValidator constructor. |
||
| 31 | */ |
||
| 32 | 1 | private function __construct() { |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @return OriginValidator |
||
| 42 | */ |
||
| 43 | 1 | static private function getInstance() { |
|
| 46 | |||
| 47 | /** |
||
| 48 | * @param $hostname |
||
| 49 | * @return bool |
||
| 50 | */ |
||
| 51 | 1 | public static function validate(string $hostname) : bool |
|
| 55 | } |
||
| 56 |