ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
RamseyUuidWrapper.php
Go to the documentation of this file.
1 <?php
2 
3 namespace ILIAS\Data\UUID;
4 
5 use Ramsey\Uuid\UuidInterface as RamseyUuidInterface;
6 
13 class RamseyUuidWrapper implements Uuid
14 {
15 
19  private $wrapped_uuid;
20 
21 
26  public function __construct(RamseyUuidInterface $wrapped_uuid)
27  {
28  $this->wrapped_uuid = $wrapped_uuid;
29  }
30 
34  public function getWrappedUuid() : RamseyUuidInterface
35  {
36  return $this->wrapped_uuid;
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 }
__construct(RamseyUuidInterface $wrapped_uuid)
Uuid constructor.