ILIAS  release_7 Revision v7.30-3-g800a261c036
RamseyUuidWrapper.php
Go to the documentation of this file.
1<?php
2
3namespace ILIAS\Data\UUID;
4
5use Ramsey\Uuid\UuidInterface as RamseyUuidInterface;
6
13class RamseyUuidWrapper implements Uuid
14{
15
20
21
26 public function __construct(RamseyUuidInterface $wrapped_uuid)
27 {
28 $this->wrapped_uuid = $wrapped_uuid;
29 }
30
34 public function getWrappedUuid() : RamseyUuidInterface
35 {
37 }
38
43 public function compareTo(Uuid $other) : int
44 {
45 return $this->wrapped_uuid->compareTo($other->getWrappedUuid());
46 }
47
52 public function equals(Uuid $other) : bool
53 {
54 return $this->wrapped_uuid->equals($other->getWrappedUuid());
55 }
56
60 public function toString() : string
61 {
62 return $this->wrapped_uuid->toString();
63 }
64}
An exception for terminatinating execution or to throw for unit testing.
__construct(RamseyUuidInterface $wrapped_uuid)
Uuid constructor.