function Uuid::uuid7
Returns a version 7 (Unix Epoch time) UUID
Parameters
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 value
UuidInterface A UuidInterface instance that represents a version 7 UUID
File
-
vendor/
ramsey/ uuid/ src/ Uuid.php, line 715
Class
- Uuid
- Uuid provides constants and static methods for working with and generating UUIDs
Namespace
Ramsey\UuidCode
public static function uuid7(?DateTimeInterface $dateTime = null) : UuidInterface {
$factory = self::getFactory();
if (method_exists($factory, 'uuid7')) {
/** @var UuidInterface */
return $factory->uuid7($dateTime);
}
throw new UnsupportedOperationException('The provided factory does not support the uuid7() method');
}