1 | <?php |
||
21 | abstract class AbstractAggregateIdentity implements AggregateIdentity |
||
22 | { |
||
23 | use ImmutabilityBehaviour; |
||
24 | |||
25 | /** |
||
26 | * Identity value. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | private $value; |
||
31 | |||
32 | /** |
||
33 | * AbstractIdentity constructor. |
||
34 | * |
||
35 | * @param string $value |
||
36 | */ |
||
37 | final protected function __construct(string $value) |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | final public function isEqualTo($identity): bool |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | final public function getValue(): string |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | final public function __toString(): string |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | final public function serialize(): string |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | * |
||
81 | * @param mixed $serialized |
||
82 | */ |
||
83 | final public function unserialize($serialized): void |
||
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | final public function jsonSerialize(): string |
||
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | * |
||
99 | * @return string[] |
||
100 | */ |
||
101 | final protected function getAllowedInterfaces(): array |
||
105 | } |
||
106 |