function UuidV6::__construct
Creates a version 6 (reordered 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/ Nonstandard/ UuidV6.php, line 54
Class
- UuidV6
- Reordered time, or version 6, UUIDs include timestamp, clock sequence, and node values that are combined into a 128-bit unsigned integer
Namespace
Ramsey\Uuid\NonstandardCode
public function __construct(Rfc4122FieldsInterface $fields, NumberConverterInterface $numberConverter, CodecInterface $codec, TimeConverterInterface $timeConverter) {
if ($fields->getVersion() !== Uuid::UUID_TYPE_REORDERED_TIME) {
throw new InvalidArgumentException('Fields used to create a UuidV6 must represent a ' . 'version 6 (reordered time) UUID');
}
parent::__construct($fields, $numberConverter, $codec, $timeConverter);
}