| 1 | <?php |
||
| 19 | class UuidIdentifier implements IdentifierInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var Uuid |
||
| 23 | */ |
||
| 24 | protected $value; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Constructor. |
||
| 28 | * |
||
| 29 | * @param Uuid $uuid |
||
| 30 | */ |
||
| 31 | public function __construct(Uuid $uuid) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * {@inheritdoc} |
||
| 38 | */ |
||
| 39 | public static function generate() |
||
| 43 | |||
| 44 | /** |
||
| 45 | * {@inheritdoc} |
||
| 46 | * |
||
| 47 | * @return static |
||
| 48 | */ |
||
| 49 | public static function fromString($id) |
||
| 57 | |||
| 58 | /** |
||
| 59 | * {@inheritdoc} |
||
| 60 | */ |
||
| 61 | public function equals(IdentifierInterface $identifier) |
||
| 65 | |||
| 66 | /** |
||
| 67 | * {@inheritdoc} |
||
| 68 | */ |
||
| 69 | public function toString() |
||
| 73 | |||
| 74 | /** |
||
| 75 | * {@inheritdoc} |
||
| 76 | */ |
||
| 77 | public function __toString() |
||
| 81 | } |
||
| 82 |