function Fields::getClockSeq
Same name in this branch
- 11.1.x vendor/ramsey/uuid/src/Nonstandard/Fields.php \Ramsey\Uuid\Nonstandard\Fields::getClockSeq()
- 11.1.x vendor/ramsey/uuid/src/Rfc4122/Fields.php \Ramsey\Uuid\Rfc4122\Fields::getClockSeq()
Overrides FieldsInterface::getClockSeq
File
-
vendor/
ramsey/ uuid/ src/ Guid/ Fields.php, line 145
Class
- Fields
- GUIDs are comprised of a set of named fields, according to RFC 4122
Namespace
Ramsey\Uuid\GuidCode
public function getClockSeq() : Hexadecimal {
if ($this->isMax()) {
$clockSeq = 0xffff;
}
elseif ($this->isNil()) {
$clockSeq = 0x0;
}
else {
$clockSeq = hexdec(bin2hex(substr($this->bytes, 8, 2))) & 0x3fff;
}
return new Hexadecimal(str_pad(dechex($clockSeq), 4, '0', STR_PAD_LEFT));
}