Total Complexity | 7 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
4 | class MXData extends DataAbstract |
||
5 | { |
||
6 | /** |
||
7 | * @var \RemotelyLiving\PHPDNS\Entities\Hostname |
||
8 | */ |
||
9 | private $target; |
||
10 | |||
11 | /** |
||
12 | * @var int |
||
13 | */ |
||
14 | private $priority; |
||
15 | |||
16 | public function __construct(Hostname $target, int $priority = 0) |
||
17 | { |
||
18 | $this->target = $target; |
||
19 | $this->priority = $priority; |
||
20 | } |
||
21 | |||
22 | public function __toString(): string |
||
25 | } |
||
26 | |||
27 | public function getTarget(): Hostname |
||
28 | { |
||
29 | return $this->target; |
||
30 | } |
||
31 | |||
32 | public function getPriority(): int |
||
33 | { |
||
34 | return $this->priority; |
||
35 | } |
||
36 | |||
37 | public function toArray(): array |
||
42 | ]; |
||
43 | } |
||
44 | |||
45 | public function serialize(): string |
||
46 | { |
||
47 | return \serialize($this->toArray()); |
||
48 | } |
||
49 | |||
50 | public function unserialize($serialized): void |
||
55 | } |
||
56 | } |
||
57 |