1 | <?php |
||
24 | class SOA implements RdataInterface |
||
25 | { |
||
26 | 1 | use RdataTrait; |
|
27 | |||
28 | const TYPE = 'SOA'; |
||
29 | const TYPE_CODE = 6; |
||
30 | |||
31 | /** |
||
32 | * The <domain-name> of the name server that was the |
||
33 | * original or primary source of data for this zone. |
||
34 | * |
||
35 | * @var string|null |
||
36 | */ |
||
37 | private $mname; |
||
38 | |||
39 | /** |
||
40 | * A <domain-name> which specifies the mailbox of the |
||
41 | * person responsible for this zone. |
||
42 | * |
||
43 | * @var string|null |
||
44 | */ |
||
45 | private $rname; |
||
46 | |||
47 | /** |
||
48 | * The unsigned 32 bit version number of the original copy |
||
49 | * of the zone. |
||
50 | * |
||
51 | * @var int|null |
||
52 | */ |
||
53 | private $serial; |
||
54 | |||
55 | /** |
||
56 | * A 32 bit time interval before the zone should be |
||
57 | * refreshed. |
||
58 | * |
||
59 | * @var int|null |
||
60 | */ |
||
61 | private $refresh; |
||
62 | |||
63 | /** |
||
64 | * A 32 bit time interval that should elapse before a |
||
65 | * failed refresh should be retried. |
||
66 | * |
||
67 | * @var int|null |
||
68 | */ |
||
69 | private $retry; |
||
70 | |||
71 | /** |
||
72 | * A 32 bit time value that specifies the upper limit on |
||
73 | * the time interval that can elapse before the zone is no |
||
74 | * longer authoritative. |
||
75 | * |
||
76 | * @var int|null |
||
77 | */ |
||
78 | private $expire; |
||
79 | |||
80 | /** |
||
81 | * The unsigned 32 bit minimum TTL field that should be |
||
82 | * exported with any RR from this zone. |
||
83 | * |
||
84 | * @var int|null |
||
85 | */ |
||
86 | private $minimum; |
||
87 | |||
88 | 31 | public function setExpire(int $expire): void |
|
89 | { |
||
90 | 31 | $this->expire = $expire; |
|
91 | 31 | } |
|
92 | |||
93 | /** |
||
94 | * @return int |
||
95 | */ |
||
96 | 6 | public function getExpire(): ?int |
|
97 | { |
||
98 | 6 | return $this->expire; |
|
99 | } |
||
100 | |||
101 | 31 | public function setMinimum(int $minimum): void |
|
105 | |||
106 | /** |
||
107 | * @return int |
||
108 | */ |
||
109 | 6 | public function getMinimum(): ?int |
|
113 | |||
114 | 31 | public function setMname(string $mname): void |
|
115 | { |
||
118 | |||
119 | /** |
||
120 | * @return string |
||
121 | */ |
||
122 | 5 | public function getMname(): ?string |
|
126 | |||
127 | 31 | public function setRefresh(int $refresh): void |
|
131 | |||
132 | /** |
||
133 | * @return int |
||
134 | */ |
||
135 | 6 | public function getRefresh(): ?int |
|
139 | |||
140 | 31 | public function setRetry(int $retry): void |
|
144 | |||
145 | /** |
||
146 | * @return int |
||
147 | */ |
||
148 | 6 | public function getRetry(): ?int |
|
152 | |||
153 | 31 | public function setRname(string $rname): void |
|
157 | |||
158 | /** |
||
159 | * @return string |
||
160 | */ |
||
161 | 5 | public function getRname(): ?string |
|
165 | |||
166 | 31 | public function setSerial(int $serial): void |
|
170 | |||
171 | /** |
||
172 | * @return int |
||
173 | */ |
||
174 | 5 | public function getSerial(): ?int |
|
178 | |||
179 | 11 | public function toText(): string |
|
202 | |||
203 | 1 | public function toWire(): string |
|
227 | |||
228 | 15 | public function fromText(string $text): void |
|
240 | |||
241 | 1 | public function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): void |
|
257 | } |
||
258 |