class UuidV3
Version 3 UUIDs are named-based, using combination of a namespace and name that are hashed into a 128-bit unsigned integer using MD5
@psalm-immutable
Hierarchy
- class \Ramsey\Uuid\Uuid implements \Ramsey\Uuid\UuidInterface uses \Ramsey\Uuid\DeprecatedUuidMethodsTrait
- class \Ramsey\Uuid\Rfc4122\UuidV3 extends \Ramsey\Uuid\Uuid implements \Ramsey\Uuid\Rfc4122\UuidInterface
Expanded class hierarchy of UuidV3
File
-
vendor/
ramsey/ uuid/ src/ Rfc4122/ UuidV3.php, line 30
Namespace
Ramsey\Uuid\Rfc4122View source
final class UuidV3 extends Uuid implements UuidInterface {
/**
* Creates a version 3 (name-based, MD5-hashed) UUID
*
* @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID
* @param NumberConverterInterface $numberConverter The number converter to use
* for converting hex values to/from integers
* @param CodecInterface $codec The codec to use when encoding or decoding
* UUID strings
* @param TimeConverterInterface $timeConverter The time converter to use
* for converting timestamps extracted from a UUID to unix timestamps
*/
public function __construct(Rfc4122FieldsInterface $fields, NumberConverterInterface $numberConverter, CodecInterface $codec, TimeConverterInterface $timeConverter) {
if ($fields->getVersion() !== Uuid::UUID_TYPE_HASH_MD5) {
throw new InvalidArgumentException('Fields used to create a UuidV3 must represent a ' . 'version 3 (name-based, MD5-hashed) UUID');
}
parent::__construct($fields, $numberConverter, $codec, $timeConverter);
}
}
Members
Title Sort descending | Deprecated | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|---|
DeprecatedUuidMethodsTrait::getClockSeqHiAndReserved | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getClockSeqHiAndReservedHex | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getClockSeqLow | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getClockSeqLowHex | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getClockSequence | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getClockSequenceHex | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getDateTime | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getFieldsHex | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getLeastSignificantBits | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getLeastSignificantBitsHex | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getMostSignificantBits | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getMostSignificantBitsHex | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getNode | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getNodeHex | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getNumberConverter | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getTimeHiAndVersion | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getTimeHiAndVersionHex | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getTimeLow | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getTimeLowHex | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getTimeMid | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getTimeMidHex | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getTimestamp | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getTimestampHex | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getVariant | Deprecated | public | function | ||
DeprecatedUuidMethodsTrait::getVersion | Deprecated | public | function | ||
Uuid::$codec | protected | property | |||
Uuid::$factory | private static | property | |||
Uuid::$factoryReplaced | private static | property | which disables all optimizations for the default/happy path internal scenarios |
||
Uuid::$fields | protected | property | |||
Uuid::$numberConverter | protected | property | |||
Uuid::$timeConverter | protected | property | |||
Uuid::compareTo | public | function | Returns -1, 0, or 1 if the UUID is less than, equal to, or greater than the other UUID |
Overrides UuidInterface::compareTo | |
Uuid::DCE_DOMAIN_GROUP | public | constant | DCE Security group domain | ||
Uuid::DCE_DOMAIN_NAMES | public | constant | DCE Security domain string names | ||
Uuid::DCE_DOMAIN_ORG | public | constant | DCE Security organization domain | ||
Uuid::DCE_DOMAIN_PERSON | public | constant | DCE Security principal domain | ||
Uuid::equals | public | function | Returns true if the UUID is equal to the provided object | Overrides UuidInterface::equals | |
Uuid::fromBytes | public static | function | Creates a UUID from a byte string | ||
Uuid::fromDateTime | public static | function | Creates a UUID from a DateTimeInterface instance | ||
Uuid::fromHexadecimal | public static | function | Creates a UUID from the Hexadecimal object | ||
Uuid::fromInteger | public static | function | Creates a UUID from a 128-bit integer string | ||
Uuid::fromString | public static | function | Creates a UUID from the string standard representation | ||
Uuid::getBytes | public | function | @psalm-return non-empty-string | Overrides UuidInterface::getBytes | |
Uuid::getFactory | public static | function | Returns the factory used to create UUIDs | ||
Uuid::getFields | public | function | Returns the fields that comprise this UUID | Overrides UuidInterface::getFields | |
Uuid::getHex | public | function | Returns the hexadecimal representation of the UUID | Overrides UuidInterface::getHex | |
Uuid::getInteger | public | function | Returns the integer representation of the UUID | Overrides UuidInterface::getInteger | |
Uuid::getUrn | public | function | Returns the string standard representation of the UUID as a URN | Overrides UuidInterface::getUrn | |
Uuid::isValid | public static | function | Returns true if the provided string is a valid UUID | ||
Uuid::jsonSerialize | public | function | Converts the UUID to a string for JSON serialization | ||
Uuid::MAX | public | constant | The max UUID is a special form of UUID that is specified to have all 128 bits set to one |
||
Uuid::NAMESPACE_DNS | public | constant | When this namespace is specified, the name string is a fully-qualified domain name |
||
Uuid::NAMESPACE_OID | public | constant | When this namespace is specified, the name string is an ISO OID | ||
Uuid::NAMESPACE_URL | public | constant | When this namespace is specified, the name string is a URL | ||
Uuid::NAMESPACE_X500 | public | constant | When this namespace is specified, the name string is an X.500 DN in DER or a text output format |
||
Uuid::NIL | public | constant | The nil UUID is a special form of UUID that is specified to have all 128 bits set to zero |
||
Uuid::RESERVED_FUTURE | public | constant | Variant: reserved for future definition | ||
Uuid::RESERVED_MICROSOFT | public | constant | Variant: reserved, Microsoft Corporation backward compatibility | ||
Uuid::RESERVED_NCS | public | constant | Variant: reserved, NCS backward compatibility | ||
Uuid::RFC_4122 | public | constant | Variant: the UUID layout specified in RFC 4122 | ||
Uuid::serialize | public | function | Converts the UUID to a string for PHP serialization | ||
Uuid::setFactory | public static | function | Sets the factory used to create UUIDs | ||
Uuid::toString | public | function | @psalm-return non-empty-string | Overrides UuidInterface::toString | |
Uuid::unserialize | public | function | Re-constructs the object from its serialized form | ||
Uuid::uuid1 | public static | function | Returns a version 1 (Gregorian time) UUID from a host ID, sequence number, and the current time |
||
Uuid::uuid2 | public static | function | Returns a version 2 (DCE Security) UUID from a local domain, local identifier, host ID, clock sequence, and the current time |
||
Uuid::uuid3 | public static | function | Returns a version 3 (name-based) UUID based on the MD5 hash of a namespace ID and a name |
||
Uuid::uuid4 | public static | function | Returns a version 4 (random) UUID | ||
Uuid::uuid5 | public static | function | Returns a version 5 (name-based) UUID based on the SHA-1 hash of a namespace ID and a name |
||
Uuid::uuid6 | public static | function | Returns a version 6 (reordered time) UUID from a host ID, sequence number, and the current time |
||
Uuid::uuid7 | public static | function | Returns a version 7 (Unix Epoch time) UUID | ||
Uuid::uuid8 | public static | function | Returns a version 8 (custom) UUID | ||
Uuid::UUID_TYPE_CUSTOM | public | constant | @link https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00#section-5.8 UUID Version 8 | ||
Uuid::UUID_TYPE_DCE_SECURITY | public | constant | Version 2 (DCE Security) UUID | ||
Uuid::UUID_TYPE_HASH_MD5 | public | constant | Version 3 (name-based and hashed with MD5) UUID | ||
Uuid::UUID_TYPE_HASH_SHA1 | public | constant | Version 5 (name-based and hashed with SHA1) UUID | ||
Uuid::UUID_TYPE_IDENTIFIER | Deprecated | public | constant | ||
Uuid::UUID_TYPE_PEABODY | Deprecated | public | constant | ||
Uuid::UUID_TYPE_RANDOM | public | constant | Version 4 (random) UUID | ||
Uuid::UUID_TYPE_REORDERED_TIME | public | constant | Version 6 (reordered time) UUID | ||
Uuid::UUID_TYPE_TIME | public | constant | Version 1 (Gregorian time) UUID | ||
Uuid::UUID_TYPE_UNIX_TIME | public | constant | Version 7 (Unix Epoch time) UUID | ||
Uuid::VALID_PATTERN | Deprecated | public | constant | ||
Uuid::__serialize | public | function | |||
Uuid::__toString | public | function | @psalm-return non-empty-string | Overrides UuidInterface::__toString | |
Uuid::__unserialize | public | function | |||
UuidV3::__construct | public | function | Creates a version 3 (name-based, MD5-hashed) UUID | Overrides Uuid::__construct |