| 1 | <?php |
||
| 17 | class PolymorphicRdata implements RdataInterface |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * The RData type. |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | private $type; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | private $data; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * PolymorphicRdata constructor. |
||
| 33 | * |
||
| 34 | * @param string|null $type |
||
| 35 | * @param string|null $data |
||
| 36 | */ |
||
| 37 | 1 | public function __construct(string $type = null, string $data = null) |
|
| 42 | |||
| 43 | /** |
||
| 44 | * @param string $type |
||
| 45 | */ |
||
| 46 | 1 | public function setType(?string $type): void |
|
| 50 | |||
| 51 | /** |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | 1 | public function getType(): string |
|
| 58 | |||
| 59 | /** |
||
| 60 | * @param string $data |
||
| 61 | */ |
||
| 62 | 1 | public function setData(?string $data): void |
|
| 66 | |||
| 67 | /** |
||
| 68 | * @return string |
||
| 69 | */ |
||
| 70 | 1 | public function getData(): string |
|
| 74 | |||
| 75 | /** |
||
| 76 | * @return string |
||
| 77 | */ |
||
| 78 | 1 | public function output(): string |
|
| 82 | } |
||
| 83 |