function DeprecatedUuidMethodsTrait::getTimestamp
Deprecated
Use { { { { the arbitrary-precision math library of your choice to convert it to a string integer.
See also
UuidInterface::getFields()} to get a
\Ramsey\Uuid\Fields\FieldsInterface} instance. If it is a
\Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
\Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()} and use
File
-
vendor/
ramsey/ uuid/ src/ DeprecatedUuidMethodsTrait.php, line 315
Class
- DeprecatedUuidMethodsTrait
- This trait encapsulates deprecated methods for ramsey/uuid; this trait and its methods will be removed in ramsey/uuid 5.0.0.
Namespace
Ramsey\UuidCode
public function getTimestamp() : string {
if ($this->fields
->getVersion() !== 1) {
throw new UnsupportedOperationException('Not a time-based UUID');
}
return $this->numberConverter
->fromHex($this->fields
->getTimestamp()
->toString());
}