1 | <?php |
||
16 | trait RdataTrait |
||
17 | { |
||
18 | /** |
||
19 | * {@inheritdoc} |
||
20 | */ |
||
21 | 30 | public function getType(): string |
|
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | 4 | public function getTypeCode(): int |
|
35 | |||
36 | /** |
||
37 | * @deprecated |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | 3 | public function output(): string |
|
47 | |||
48 | /** |
||
49 | * Encode a domain name as a sequence of labels. |
||
50 | * |
||
51 | * @param string $name |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | 26 | public static function encodeName(string $name): string |
|
70 | |||
71 | /** |
||
72 | * @param string $string |
||
73 | * @param int $offset |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | 14 | public static function decodeName(string $string, int &$offset = 0): string |
|
96 | } |
||
97 |
If you suppress an error, we recommend checking for the error condition explicitly: