| 1 | <?php |
||
| 8 | final class UuidAggregateRootId implements AggregateRootId |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | private $identifier; |
||
| 14 | |||
| 15 | 5 | public function __construct(string $identifier) |
|
| 19 | |||
| 20 | 2 | public function equals($otherId): bool |
|
| 25 | |||
| 26 | 1 | public function toString(): string |
|
| 30 | |||
| 31 | 3 | public function toUuid(): UuidInterface |
|
| 35 | |||
| 36 | 4 | public static function create(): UuidAggregateRootId |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @param string $aggregateRootId |
||
| 43 | * @return static |
||
| 44 | */ |
||
| 45 | 1 | public static function fromString(string $aggregateRootId): AggregateRootId |
|
| 49 | } |