1 | <?php |
||
18 | class NSEC implements RdataInterface |
||
19 | { |
||
20 | use RdataTrait; |
||
21 | |||
22 | const TYPE = 'NSEC'; |
||
23 | const TYPE_CODE = 47; |
||
24 | |||
25 | /** |
||
26 | * The Next Domain field contains the next owner name (in the canonical |
||
27 | * ordering of the zone) that has authoritative data or contains a |
||
28 | * delegation point NS RR set. |
||
29 | * {@link https://tools.ietf.org/html/rfc4034#section-4.1.1}. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | private $nextDomainName; |
||
34 | |||
35 | /** |
||
36 | * @var array |
||
37 | */ |
||
38 | private $types = []; |
||
39 | |||
40 | /** |
||
41 | * @return string |
||
42 | */ |
||
43 | 2 | public function getNextDomainName(): string |
|
47 | |||
48 | /** |
||
49 | * @param string $nextDomainName |
||
50 | */ |
||
51 | 4 | public function setNextDomainName(string $nextDomainName): void |
|
55 | |||
56 | /** |
||
57 | * @param string $type |
||
58 | */ |
||
59 | 5 | public function addType(string $type): void |
|
63 | |||
64 | /** |
||
65 | * Clears the types from the RDATA. |
||
66 | */ |
||
67 | 1 | public function clearTypes(): void |
|
71 | |||
72 | /** |
||
73 | * @return array |
||
74 | */ |
||
75 | 3 | public function getTypes(): array |
|
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | 2 | public function toText(): string |
|
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | * |
||
95 | * @throws UnsupportedTypeException |
||
96 | */ |
||
97 | 1 | public function toWire(): string |
|
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | 2 | public static function fromText(string $text): RdataInterface |
|
118 | |||
119 | /** |
||
120 | * {@inheritdoc} |
||
121 | * |
||
122 | * @throws UnsupportedTypeException |
||
123 | */ |
||
124 | 1 | public static function fromWire(string $rdata): RdataInterface |
|
134 | |||
135 | /** |
||
136 | * @param string $rdata |
||
137 | * @param int $offset |
||
138 | * |
||
139 | * @return string[] |
||
140 | * |
||
141 | * @throws UnsupportedTypeException |
||
142 | */ |
||
143 | 3 | public static function parseBitmap(string $rdata, int &$offset): array |
|
164 | |||
165 | /** |
||
166 | * @param string[] $types |
||
167 | * |
||
168 | * @return string |
||
169 | * |
||
170 | * @throws UnsupportedTypeException |
||
171 | */ |
||
172 | 3 | public static function renderBitmap(array $types): string |
|
196 | } |
||
197 |