| 1 | <?php |
||
| 19 | final class DnsRecord |
||
| 20 | { |
||
| 21 | private $name; |
||
| 22 | private $type; |
||
| 23 | private $value; |
||
| 24 | private $priority; |
||
| 25 | private $valid; |
||
| 26 | private $cached; |
||
| 27 | |||
| 28 | 4 | public static function create(array $data): self |
|
| 40 | |||
| 41 | 4 | private function __construct() |
|
| 44 | |||
| 45 | /** |
||
| 46 | * name of the record, as used in CNAME, etc. |
||
| 47 | */ |
||
| 48 | 1 | public function getName(): ?string |
|
| 52 | |||
| 53 | /** |
||
| 54 | * DNS record type. |
||
| 55 | * |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | 1 | public function getType(): ?string |
|
| 62 | |||
| 63 | /** |
||
| 64 | * DNS record value. |
||
| 65 | */ |
||
| 66 | 1 | public function getValue(): ?string |
|
| 70 | |||
| 71 | /** |
||
| 72 | * Record priority, used for MX. |
||
| 73 | */ |
||
| 74 | public function getPriority(): ?string |
||
| 78 | |||
| 79 | /** |
||
| 80 | * DNS record has been added to domain DNS? |
||
| 81 | */ |
||
| 82 | 1 | public function isValid(): bool |
|
| 86 | |||
| 87 | 1 | public function getValidity(): ?string |
|
| 91 | |||
| 92 | /** |
||
| 93 | * DNS record current value. |
||
| 94 | */ |
||
| 95 | public function getCached(): array |
||
| 99 | } |
||
| 100 |