Support version 6 UUIDs

See the following:

* https://github.com/uuid6/uuid6-ietf-draft
* http://gh.peabody.io/uuidv6/
This commit is contained in:
Ben Ramsey
2020-02-22 22:41:15 -06:00
parent 65b0c091c0
commit cc2bf6f8ef
12 changed files with 473 additions and 4 deletions
+15
View File
@@ -105,6 +105,21 @@ interface UuidFactoryInterface
*/
public function uuid5($ns, string $name): UuidInterface;
/**
* Returns a version 6 (ordered-time) UUID from a host ID, sequence number,
* and the current time
*
* @param int|string $node A 48-bit number representing the hardware address;
* this number may be represented as an integer or a hexadecimal string
* @param int $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
*
* @return UuidInterface A UuidInterface instance that represents a
* version 6 UUID
*/
public function uuid6($node = null, ?int $clockSeq = null): UuidInterface;
/**
* Creates a UUID from a byte string
*