| 1 | <?php |
||
| 21 | abstract class AbstractIdentity implements Identity |
||
| 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 jsonSerialize(): string |
||
| 77 | |||
| 78 | /** |
||
| 79 | * {@inheritdoc} |
||
| 80 | * |
||
| 81 | * @return string[] |
||
| 82 | */ |
||
| 83 | final protected function getAllowedInterfaces(): array |
||
| 87 | } |
||
| 88 |