Methods |
public
|
fromBytes(string $bytes): UuidInterface
Creates a UUID from a byte string
Creates a UUID from a byte string
Parameters
Returns
A UuidInterface instance created from a binary string representation
|
#
|
public
|
fromDateTime(DateTimeInterface $dateTime, Hexadecimal|null $node = null, int|null $clockSeq = null): UuidInterface
Creates a UUID from a DateTimeInterface instance
Creates a UUID from a DateTimeInterface instance
Parameters
$dateTime |
The date and time
|
$node |
A 48-bit number representing the hardware address
|
$clockSeq |
A 14-bit number used to help avoid duplicates that could arise when the clock is set
backwards in time or if the node ID changes
|
Returns
A UuidInterface instance that represents a version 1 UUID created from a DateTimeInterface instance
|
#
|
public
|
fromInteger(string $integer): UuidInterface
Creates a UUID from a 128-bit integer string
Creates a UUID from a 128-bit integer string
Parameters
$integer |
String representation of 128-bit integer
|
Returns
A UuidInterface instance created from the string representation of a 128-bit integer
|
#
|
public
|
fromString(string $uuid): UuidInterface
Creates a UUID from the string standard representation
Creates a UUID from the string standard representation
Parameters
$uuid |
A hexadecimal string
|
Returns
A UuidInterface instance created from a hexadecimal string representation
|
#
|
public
|
getValidator(): ValidatorInterface
Returns the validator used by the factory
Returns the validator used by the factory
|
#
|
public
|
uuid1(Hexadecimal|int|string|null $node = null, int|null $clockSeq = null): UuidInterface
Returns a version 1 (Gregorian time) UUID from a host ID, sequence number, and the current time
Returns a version 1 (Gregorian time) UUID from a host ID, sequence number, and the current time
Parameters
$node |
A 48-bit number representing the hardware address; this number may
be represented as an integer or a hexadecimal string
|
$clockSeq |
A 14-bit number used to help avoid duplicates that could arise when the clock is set
backwards in time or if the node ID changes
|
Returns
A UuidInterface instance that represents a version 1 UUID
|
#
|
public
|
uuid2(
int $localDomain,
Integer|null $localIdentifier = null,
Hexadecimal|null $node = null,
int|null $clockSeq = null,
): UuidInterface
Returns a version 2 (DCE Security) UUID from a local domain, local identifier, host ID, clock sequence, and the
current…
Returns a version 2 (DCE Security) UUID from a local domain, local identifier, host ID, clock sequence, and the
current time
Parameters
$localDomain |
The local domain to use when generating bytes, according to DCE Security
|
$localIdentifier |
The local identifier for the given domain; this may be a UID or GID
on POSIX systems, if the local domain is a person or group, or it may be a site-defined identifier if the
local domain is org
|
$node |
A 48-bit number representing the hardware address
|
$clockSeq |
A 14-bit number used to help avoid duplicates that could arise when the clock is set
backwards in time or if the node ID changes
|
Returns
A UuidInterface instance that represents a version 2 UUID
|
#
|
public
|
uuid3(UuidInterface|string $ns, string $name): UuidInterface
Returns a version 3 (name-based) UUID based on the MD5 hash of a namespace ID and a name
Returns a version 3 (name-based) UUID based on the MD5 hash of a namespace ID and a name
Parameters
$ns |
The namespace (must be a valid UUID)
|
$name |
The name to use for creating a UUID
|
Returns
A UuidInterface instance that represents a version 3 UUID
|
#
|
public
|
uuid4(): UuidInterface
Returns a version 4 (random) UUID
Returns a version 4 (random) UUID
Returns
A UuidInterface instance that represents a version 4 UUID
|
#
|
public
|
uuid5(UuidInterface|string $ns, string $name): UuidInterface
Returns a version 5 (name-based) UUID based on the SHA-1 hash of a namespace ID and a name
Returns a version 5 (name-based) UUID based on the SHA-1 hash of a namespace ID and a name
Parameters
$ns |
The namespace (must be a valid UUID)
|
$name |
The name to use for creating a UUID
|
Returns
A UuidInterface instance that represents a version 5 UUID
|
#
|
public
|
uuid6(Hexadecimal|null $node = null, int|null $clockSeq = null): UuidInterface
Returns a version 6 (reordered Gregorian time) UUID from a host ID, sequence number, and the current time
Returns a version 6 (reordered Gregorian time) UUID from a host ID, sequence number, and the current time
Parameters
$node |
A 48-bit number representing the hardware address
|
$clockSeq |
A 14-bit number used to help avoid duplicates that could arise when the clock is set
backwards in time or if the node ID changes
|
Returns
A UuidInterface instance that represents a version 6 UUID
|
#
|