1 | <?php |
||
17 | final class DnsRecord |
||
18 | { |
||
19 | /** |
||
20 | * @var string|null |
||
21 | */ |
||
22 | private $name; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $type; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $value; |
||
33 | |||
34 | /** |
||
35 | * @var string|null |
||
36 | */ |
||
37 | private $priority; |
||
38 | |||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | private $valid; |
||
43 | |||
44 | /** |
||
45 | * @param array $data |
||
46 | * |
||
47 | * @return self |
||
48 | */ |
||
49 | public static function create(array $data) |
||
59 | |||
60 | /** |
||
61 | * @param string|null $name Name of the record, as used in CNAME, etc. |
||
62 | * @param string $type DNS record type |
||
63 | * @param string $value DNS record value |
||
64 | * @param string|null $priority Record priority, used for MX |
||
65 | * @param string $valid DNS record has been added to domain DNS? |
||
66 | */ |
||
67 | private function __construct($name, $type, $value, $priority, $valid) |
||
75 | |||
76 | /** |
||
77 | * @return string|null |
||
78 | */ |
||
79 | public function getName() |
||
83 | |||
84 | /** |
||
85 | * @return string |
||
86 | */ |
||
87 | public function getType() |
||
91 | |||
92 | /** |
||
93 | * @return string |
||
94 | */ |
||
95 | public function getValue() |
||
99 | |||
100 | /** |
||
101 | * @return string|null |
||
102 | */ |
||
103 | public function getPriority() |
||
107 | |||
108 | /** |
||
109 | * @return bool |
||
110 | */ |
||
111 | public function isValid() |
||
115 | |||
116 | /** |
||
117 | * @return string |
||
118 | */ |
||
119 | public function getValidity() |
||
123 | } |
||
124 |