function UuidV7::__construct
Creates a version 7 (Unix Epoch time) UUID
Parameters
Rfc4122FieldsInterface $fields The fields from which to construct a UUID:
NumberConverterInterface $numberConverter The number converter to use: for converting hex values to/from integers
CodecInterface $codec The codec to use when encoding or decoding: UUID strings
TimeConverterInterface $timeConverter The time converter to use: for converting timestamps extracted from a UUID to unix timestamps
Overrides Uuid::__construct
File
-
vendor/
ramsey/ uuid/ src/ Rfc4122/ UuidV7.php, line 47
Class
- UuidV7
- Unix Epoch time, or version 7, UUIDs include a timestamp in milliseconds since the Unix Epoch, along with random bytes
Namespace
Ramsey\Uuid\Rfc4122Code
public function __construct(Rfc4122FieldsInterface $fields, NumberConverterInterface $numberConverter, CodecInterface $codec, TimeConverterInterface $timeConverter) {
if ($fields->getVersion() !== Uuid::UUID_TYPE_UNIX_TIME) {
throw new InvalidArgumentException('Fields used to create a UuidV7 must represent a ' . 'version 7 (Unix Epoch time) UUID');
}
parent::__construct($fields, $numberConverter, $codec, $timeConverter);
}