1 | <?php |
||
21 | class TrackingId |
||
22 | { |
||
23 | /** |
||
24 | * @param string $aTrackingId |
||
25 | * @return TrackingId |
||
26 | */ |
||
27 | public static function fromString(string $aTrackingId): TrackingId |
||
31 | |||
32 | /** |
||
33 | * @return TrackingId |
||
34 | */ |
||
35 | public static function generate(): TrackingId |
||
39 | |||
40 | /** |
||
41 | * @var Uuid |
||
42 | */ |
||
43 | private $uuid; |
||
44 | |||
45 | /** |
||
46 | * Always provide a string representation of the TrackingId to construct the VO |
||
47 | * |
||
48 | * @param UuidInterface $aUuid |
||
49 | * |
||
50 | * @throws Exception\InvalidArgumentException |
||
51 | */ |
||
52 | public function __construct(UuidInterface $aUuid) |
||
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | public function toString(): string |
||
64 | |||
65 | /** |
||
66 | * @return string |
||
67 | */ |
||
68 | public function __toString(): string |
||
72 | |||
73 | /** |
||
74 | * @param TrackingId $other |
||
75 | * @return bool |
||
76 | */ |
||
77 | public function sameValueAs(TrackingId $other): bool |
||
81 | } |
||
82 |