1 | <?php |
||
19 | class PolymorphicRdata implements RdataInterface |
||
20 | { |
||
21 | /** |
||
22 | * The RData type. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | private $type; |
||
27 | |||
28 | /** |
||
29 | * @var string|null |
||
30 | */ |
||
31 | private $data; |
||
32 | |||
33 | /** |
||
34 | * @var int |
||
35 | */ |
||
36 | private $typeCode = 0; |
||
37 | |||
38 | /** |
||
39 | * PolymorphicRdata constructor. |
||
40 | */ |
||
41 | 2 | public function __construct(?string $type = null, ?string $data = null) |
|
51 | |||
52 | 2 | public function setType(string $type): void |
|
61 | |||
62 | 2 | public function getType(): string |
|
66 | |||
67 | public function setTypeCode(int $typeCode): void |
||
71 | |||
72 | 1 | public function getTypeCode(): int |
|
76 | |||
77 | 2 | public function setData(string $data): void |
|
81 | |||
82 | 2 | public function getData(): ?string |
|
86 | |||
87 | 1 | public function toText(): string |
|
91 | |||
92 | public function toWire(): string |
||
96 | |||
97 | public function fromText(string $text): void |
||
101 | |||
102 | public function fromWire(string $rdata, int &$offset = 0, ?int $rdLength = null): void |
||
106 | } |
||
107 |