UuidInterface
extends
UuidInterface
in
Also known as a Leach-Salz variant UUID, an RFC 4122 variant UUID is a universally unique identifier defined by RFC 4122
Tags
Table of Contents
- __toString() : string
- Casts the UUID to the string standard representation
- compareTo() : int
- Returns -1, 0, or 1 if the UUID is less than, equal to, or greater than the other UUID
- equals() : bool
- Returns true if the UUID is equal to the provided object
- getBytes() : string
- Returns the binary string representation of the UUID
- getClockSeqHiAndReservedHex() : string
- getClockSeqLowHex() : string
- getClockSequenceHex() : string
- getDateTime() : DateTimeInterface
- getFields() : FieldsInterface
- Returns the fields that comprise this UUID
- getFieldsHex() : array<string|int, string>
- getHex() : Hexadecimal
- Returns the hexadecimal representation of the UUID
- getInteger() : Integer
- Returns the integer representation of the UUID
- getLeastSignificantBitsHex() : string
- getMostSignificantBitsHex() : string
- getNodeHex() : string
- getNumberConverter() : NumberConverterInterface
- getTimeHiAndVersionHex() : string
- getTimeLowHex() : string
- getTimeMidHex() : string
- getTimestampHex() : string
- getUrn() : string
- Returns the string standard representation of the UUID as a URN
- getVariant() : int|null
- getVersion() : int|null
- toString() : string
- Returns the string standard representation of the UUID
Methods
__toString()
Casts the UUID to the string standard representation
public
__toString() : string
Tags
Return values
string —compareTo()
Returns -1, 0, or 1 if the UUID is less than, equal to, or greater than the other UUID
public
compareTo(UuidInterface $other) : int
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
- $other : UuidInterface
-
The UUID to compare
Return values
int —-1, 0, or 1 if the UUID is less than, equal to, or greater than $other
equals()
Returns true if the UUID is equal to the provided object
public
equals(object|null $other) : bool
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 the UUID.
Parameters
- $other : object|null
-
An object to test for equality with this UUID
Return values
bool —True if the other object is equal to this UUID
getBytes()
Returns the binary string representation of the UUID
public
getBytes() : string
Tags
Return values
string —getClockSeqHiAndReservedHex()
public
getClockSeqHiAndReservedHex() : string
Tags
Return values
string —getClockSeqLowHex()
public
getClockSeqLowHex() : string
Tags
Return values
string —getClockSequenceHex()
public
getClockSequenceHex() : string
Tags
Return values
string —getDateTime()
public
getDateTime() : DateTimeInterface
Tags
Return values
DateTimeInterface —getFields()
Returns the fields that comprise this UUID
public
getFields() : FieldsInterface
Return values
FieldsInterface —getFieldsHex()
public
getFieldsHex() : array<string|int, string>
Tags
Return values
array<string|int, string> —getHex()
Returns the hexadecimal representation of the UUID
public
getHex() : Hexadecimal
Return values
Hexadecimal —getInteger()
Returns the integer representation of the UUID
public
getInteger() : Integer
Return values
Integer —getLeastSignificantBitsHex()
public
getLeastSignificantBitsHex() : string
Tags
Return values
string —getMostSignificantBitsHex()
public
getMostSignificantBitsHex() : string
Tags
Return values
string —getNodeHex()
public
getNodeHex() : string
Tags
Return values
string —getNumberConverter()
public
getNumberConverter() : NumberConverterInterface
Tags
Return values
NumberConverterInterface —getTimeHiAndVersionHex()
public
getTimeHiAndVersionHex() : string
Tags
Return values
string —getTimeLowHex()
public
getTimeLowHex() : string
Tags
Return values
string —getTimeMidHex()
public
getTimeMidHex() : string
Tags
Return values
string —getTimestampHex()
public
getTimestampHex() : string
Tags
Return values
string —getUrn()
Returns the string standard representation of the UUID as a URN
public
getUrn() : string
Tags
Return values
string —getVariant()
public
getVariant() : int|null
Tags
Return values
int|null —getVersion()
public
getVersion() : int|null
Tags
Return values
int|null —toString()
Returns the string standard representation of the UUID
public
toString() : string