1 | <?php |
||
21 | class TxtRecord extends Record |
||
22 | { |
||
23 | /** |
||
24 | * @var String |
||
25 | */ |
||
26 | protected $txtData; |
||
27 | |||
28 | /** |
||
29 | * TxtRecord constructor. |
||
30 | * |
||
31 | * @param Node $node |
||
32 | * @param int $ttl |
||
33 | * @param string $txtData |
||
34 | */ |
||
35 | 1 | public function __construct(Node $node, int $ttl, string $txtData) |
|
40 | |||
41 | /** |
||
42 | * @param string $txtData |
||
43 | * @return string |
||
44 | */ |
||
45 | 1 | private function sanitizeTxtData(string $txtData) : string |
|
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | 1 | public function __toString() : string |
|
75 | |||
76 | /** |
||
77 | * @return String |
||
78 | */ |
||
79 | 1 | public function getTxtData() : string |
|
83 | |||
84 | /** |
||
85 | * @param string $txtData |
||
86 | * @return TxtRecord |
||
87 | */ |
||
88 | public function setTxtData(string $txtData) : TxtRecord |
||
92 | |||
93 | /** |
||
94 | * @return bool |
||
95 | */ |
||
96 | 1 | public function validate() : bool |
|
107 | |||
108 | /** |
||
109 | * @return array |
||
110 | */ |
||
111 | 1 | protected function recordDataToArray() : array |
|
117 | } |