ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Data\UUID\RamseyUuidWrapper Class Reference
+ Inheritance diagram for ILIAS\Data\UUID\RamseyUuidWrapper:
+ Collaboration diagram for ILIAS\Data\UUID\RamseyUuidWrapper:

Public Member Functions

 __construct (RamseyUuidInterface $wrapped_uuid)
 
 getWrappedUuid ()
 
 compareTo (Uuid $other)
 Compares this UUID to the specified UUID. More...
 
 equals (Uuid $other)
 Compares this object to the specified object. More...
 
 toString ()
 Converts this UUID into a string representation. More...
 
 __toString ()
 Enforce that UUID implementation implement the __toString() magic method. More...
 

Private Attributes

RamseyUuidInterface $wrapped_uuid
 

Detailed Description

Definition at line 15 of file RamseyUuidWrapper.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Data\UUID\RamseyUuidWrapper::__construct ( RamseyUuidInterface  $wrapped_uuid)

Definition at line 19 of file RamseyUuidWrapper.php.

References ILIAS\Data\UUID\RamseyUuidWrapper\$wrapped_uuid.

20  {
21  $this->wrapped_uuid = $wrapped_uuid;
22  }

Member Function Documentation

◆ __toString()

ILIAS\Data\UUID\RamseyUuidWrapper::__toString ( )

Enforce that UUID implementation implement the __toString() magic method.

Implements ILIAS\Data\UUID\Uuid.

Definition at line 44 of file RamseyUuidWrapper.php.

References ILIAS\Data\UUID\RamseyUuidWrapper\toString().

44  : string
45  {
46  return $this->toString();
47  }
toString()
Converts this UUID into a string representation.
+ Here is the call graph for this function:

◆ compareTo()

ILIAS\Data\UUID\RamseyUuidWrapper::compareTo ( Uuid  $other)

Compares this UUID to the specified UUID.

The first of two UUIDs is greater than the second if the most significant field in which the UUIDs differ is greater for the first UUID.

  • Q. What's the value of being able to sort UUIDs?
  • A. Use them as keys in a B-Tree or similar mapping.
Parameters
Uuid$otherUUID to which this UUID is compared
Returns
int -1, 0 or 1 as this UUID is less than, equal to, or greater than $uuid

Implements ILIAS\Data\UUID\Uuid.

Definition at line 29 of file RamseyUuidWrapper.php.

29  : int
30  {
31  return $this->wrapped_uuid->compareTo($other->getWrappedUuid());
32  }

◆ equals()

ILIAS\Data\UUID\RamseyUuidWrapper::equals ( Uuid  $other)

Compares this object to the specified object.

The result is true if and only if the argument is not null, is a UUID object, has the same variant, and contains the same value, bit for bit, as this UUID.

Parameters
Uuid$other
Returns
bool True if $other is equal to this UUID

Implements ILIAS\Data\UUID\Uuid.

Definition at line 34 of file RamseyUuidWrapper.php.

34  : bool
35  {
36  return $this->wrapped_uuid->equals($other->getWrappedUuid());
37  }

◆ getWrappedUuid()

ILIAS\Data\UUID\RamseyUuidWrapper::getWrappedUuid ( )

Definition at line 24 of file RamseyUuidWrapper.php.

References ILIAS\Data\UUID\RamseyUuidWrapper\$wrapped_uuid.

24  : RamseyUuidInterface
25  {
26  return $this->wrapped_uuid;
27  }

◆ toString()

ILIAS\Data\UUID\RamseyUuidWrapper::toString ( )

Converts this UUID into a string representation.

Implements ILIAS\Data\UUID\Uuid.

Definition at line 39 of file RamseyUuidWrapper.php.

Referenced by ILIAS\Data\UUID\RamseyUuidWrapper\__toString().

39  : string
40  {
41  return $this->wrapped_uuid->toString();
42  }
+ Here is the caller graph for this function:

Field Documentation

◆ $wrapped_uuid

RamseyUuidInterface ILIAS\Data\UUID\RamseyUuidWrapper::$wrapped_uuid
private

The documentation for this class was generated from the following file: