1 | <?php |
||
19 | class Id implements IdInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $value; |
||
25 | |||
26 | /** |
||
27 | * PostId constructor. |
||
28 | * |
||
29 | * @param string $value |
||
30 | */ |
||
31 | public function __construct($value) |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | public function equals($other) |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function hashCode() |
||
51 | |||
52 | /** |
||
53 | * @param mixed $value |
||
54 | * |
||
55 | * @return static |
||
56 | */ |
||
57 | public static function fromNative($value) |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function toNative() |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function __toString() |
||
77 | } |
||
78 |