Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/UuidFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,31 @@ public function uuid5(UuidInterface | string $ns, string $name): UuidInterface;
* @return UuidInterface A UuidInterface instance that represents a version 6 UUID
*/
public function uuid6(?Hexadecimal $node = null, ?int $clockSeq = null): UuidInterface;

/**
* Returns a version 7 (Unix Epoch time) UUID
*
* @param DateTimeInterface | null $dateTime An optional date/time from which to create the version 7 UUID. If not
* provided, the UUID is generated using the current date/time.
*
* @return UuidInterface A UuidInterface instance that represents a version 7 UUID
*/
public function uuid7(?DateTimeInterface $dateTime = null): UuidInterface;

/**
* Returns a version 8 (custom format) UUID
*
* The bytes provided may contain any value according to your application's needs. Be aware, however, that other
* applications may not understand the semantics of the value.
*
* @param non-empty-string $bytes A 16-byte octet string. This is an open blob of data that you may fill with 128
* bits of information. Be aware, however, bits 48 through 51 will be replaced with the UUID version field, and
* bits 64 and 65 will be replaced with the UUID variant. You MUST NOT rely on these bits for your application
* needs.
*
* @return UuidInterface A UuidInterface instance that represents a version 8 UUID
*
* @pure
*/
public function uuid8(string $bytes): UuidInterface;
}
Loading