ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 31 of file RamseyUuidWrapper.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 35 of file RamseyUuidWrapper.php.

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

36  {
37  $this->wrapped_uuid = $wrapped_uuid;
38  }

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 60 of file RamseyUuidWrapper.php.

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

60  : string
61  {
62  return $this->toString();
63  }
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 45 of file RamseyUuidWrapper.php.

45  : int
46  {
47  return $this->wrapped_uuid->compareTo($other->getWrappedUuid());
48  }

◆ 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 50 of file RamseyUuidWrapper.php.

50  : bool
51  {
52  return $this->wrapped_uuid->equals($other->getWrappedUuid());
53  }

◆ getWrappedUuid()

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

Definition at line 40 of file RamseyUuidWrapper.php.

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

40  : RamseyUuidInterface
41  {
42  return $this->wrapped_uuid;
43  }

◆ toString()

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

Converts this UUID into a string representation.

Implements ILIAS\Data\UUID\Uuid.

Definition at line 55 of file RamseyUuidWrapper.php.

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

55  : string
56  {
57  return $this->wrapped_uuid->toString();
58  }
+ 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: