UuidInterface
A UUID is a universally unique identifier adhering to an agreed-upon representation format and standard for generation
- Full name:
\Ramsey\Uuid\UuidInterface
- Parent interfaces:
\Ramsey\Uuid\DeprecatedUuidInterface
,JsonSerializable
,Serializable
,Stringable
Methods
compareTo
Returns -1, 0, or 1 if the UUID is less than, equal to, or greater than the other 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:
Parameter | Type | Description |
---|---|---|
$other |
\Ramsey\Uuid\UuidInterface | The UUID to compare |
Return Value:
-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
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:
Parameter | Type | Description |
---|---|---|
$other |
object|null | An object to test for equality with this UUID |
Return Value:
True if the other object is equal to this UUID
getBytes
Returns the binary string representation of the UUID
getFields
Returns the fields that comprise this UUID
getHex
Returns the hexadecimal representation of the UUID
getInteger
Returns the integer representation of the UUID
getUrn
Returns the string standard representation of the UUID as a URN
See Also:
- http://en.wikipedia.org/wiki/Uniform_Resource_Name - Uniform Resource Name* https://tools.ietf.org/html/rfc4122#section-3 - RFC 4122, ยง 3: Namespace Registration Template
toString
Returns the string standard representation of the UUID
__toString
Casts the UUID to the string standard representation
Inherited methods
getNumberConverter
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getFieldsHex
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getClockSeqHiAndReservedHex
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getClockSeqLowHex
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getClockSequenceHex
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getDateTime
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getLeastSignificantBitsHex
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getMostSignificantBitsHex
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getNodeHex
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getTimeHiAndVersionHex
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getTimeLowHex
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getTimeMidHex
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getTimestampHex
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getVariant
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
getVersion
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
Automatically generated on 2025-03-18