FileAccess Orion

UuidInterface extends DeprecatedUuidInterface, JsonSerializable, Serializable

A UUID is a universally unique identifier adhering to an agreed-upon representation format and standard for generation

Tags
psalm-immutable

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
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
psalm-return

non-empty-string

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
psalm-return

non-empty-string

Return values
string

getDateTime()

public getDateTime() : DateTimeInterface
Tags
deprecated

In ramsey/uuid version 5.0.0, this will be removed from the interface. It is available at UuidV1::getDateTime().

Return values
DateTimeInterface

getLeastSignificantBitsHex()

public getLeastSignificantBitsHex() : string
Tags
deprecated

This method will be removed in 5.0.0. There is no direct alternative, but the same information may be obtained by splitting in half the value returned by UuidInterface::getHex().

Return values
string

getMostSignificantBitsHex()

public getMostSignificantBitsHex() : string
Tags
deprecated

This method will be removed in 5.0.0. There is no direct alternative, but the same information may be obtained by splitting in half the value returned by UuidInterface::getHex().

Return values
string

toString()

Returns the string standard representation of the UUID

public toString() : string
Tags
psalm-return

non-empty-string

Return values
string

Search results