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 | * @var array |
||
46 | */ |
||
47 | private $cached; |
||
48 | |||
49 | /** |
||
50 | * @param array $data |
||
51 | * |
||
52 | * @return self |
||
53 | */ |
||
54 | 1 | public static function create(array $data) |
|
65 | |||
66 | /** |
||
67 | * @param string|null $name Name of the record, as used in CNAME, etc. |
||
68 | * @param string $type DNS record type |
||
69 | * @param string $value DNS record value |
||
70 | * @param string|null $priority Record priority, used for MX |
||
71 | * @param string $valid DNS record has been added to domain DNS? |
||
72 | * @param array $cached DNS record current value |
||
73 | */ |
||
74 | 1 | private function __construct($name, $type, $value, $priority, $valid, $cached) |
|
83 | |||
84 | /** |
||
85 | * @return string|null |
||
86 | */ |
||
87 | public function getName() |
||
91 | |||
92 | /** |
||
93 | * @return string |
||
94 | */ |
||
95 | public function getType() |
||
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | public function getValue() |
||
107 | |||
108 | /** |
||
109 | * @return string|null |
||
110 | */ |
||
111 | public function getPriority() |
||
115 | |||
116 | /** |
||
117 | * @return bool |
||
118 | */ |
||
119 | public function isValid() |
||
123 | |||
124 | /** |
||
125 | * @return string |
||
126 | */ |
||
127 | public function getValidity() |
||
131 | |||
132 | /** |
||
133 | * @return array |
||
134 | */ |
||
135 | public function getCached() |
||
139 | } |
||
140 |