1 | <?php |
||
22 | class HINFO implements RdataInterface |
||
23 | { |
||
24 | 1 | use RdataTrait; |
|
25 | |||
26 | const TYPE = 'HINFO'; |
||
27 | const TYPE_CODE = 13; |
||
28 | |||
29 | /** |
||
30 | * @var string|null |
||
31 | */ |
||
32 | private $cpu; |
||
33 | |||
34 | /** |
||
35 | * @var string|null |
||
36 | */ |
||
37 | private $os; |
||
38 | |||
39 | 15 | public function setCpu(?string $cpu): void |
|
40 | { |
||
41 | 15 | $this->cpu = $cpu; |
|
42 | 15 | } |
|
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | 4 | public function getCpu(): ?string |
|
48 | { |
||
49 | 4 | return $this->cpu; |
|
50 | } |
||
51 | |||
52 | 15 | public function setOs(?string $os): void |
|
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | 4 | public function getOs(): ?string |
|
64 | |||
65 | 4 | public function toText(): string |
|
66 | { |
||
69 | |||
70 | 1 | public function toWire(): string |
|
74 | |||
75 | 1 | public function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): void |
|
80 | |||
81 | 2 | public function fromText(string $text): void |
|
87 | |||
88 | 2 | private static function extractText(StringIterator $string): string |
|
108 | } |
||
109 |