class Guid
Guid represents a UUID with "native" (little-endian) byte order
From Wikipedia:
> The first three fields are unsigned 32- and 16-bit integers and are subject > to swapping, while the last two fields consist of uninterpreted bytes, not > subject to swapping. This byte swapping applies even for versions 3, 4, and > 5, where the canonical fields do not correspond to the content of the UUID.
The first three fields of a GUID are encoded in little-endian byte order, while the last three fields are in network (big-endian) byte order. This is according to the history of the Microsoft definition of a GUID.
According to the .NET Guid.ToByteArray method documentation:
> Note that the order of bytes in the returned byte array is different from > the string representation of a Guid value. The order of the beginning > four-byte group and the next two two-byte groups is reversed, whereas the > order of the last two-byte group and the closing six-byte group is the > same.
@link https://en.wikipedia.org/wiki/Universally_unique_identifier#Variants UUID Variants on Wikipedia @link https://docs.microsoft.com/en-us/windows/win32/api/guiddef/ns-guiddef-g… Windows GUID structure @link https://docs.microsoft.com/en-us/dotnet/api/system.guid .NET Guid Struct @link https://docs.microsoft.com/en-us/dotnet/api/system.guid.tobytearray .NET Guid.ToByteArray Method
@psalm-immutable
Hierarchy
- class \Ramsey\Uuid\Uuid implements \Ramsey\Uuid\UuidInterface uses \Ramsey\Uuid\DeprecatedUuidMethodsTrait
- class \Ramsey\Uuid\Guid\Guid extends \Ramsey\Uuid\Uuid
Expanded class hierarchy of Guid
1 file declares its use of Guid
- GuidStringCodec.php in vendor/
ramsey/ uuid/ src/ Codec/ GuidStringCodec.php
4 string references to 'Guid'
- Rss::render in core/
modules/ node/ src/ Plugin/ views/ row/ Rss.php - Renders a row object.
- Rss::render in core/
modules/ comment/ src/ Plugin/ views/ row/ Rss.php - Renders a row object.
- RssFields::render in core/
modules/ views/ src/ Plugin/ views/ row/ RssFields.php - Renders a row object.
- xae.php in core/
lib/ Drupal/ Component/ Transliteration/ data/ xae.php
File
-
vendor/
ramsey/ uuid/ src/ Guid/ Guid.php, line 51
Namespace
Ramsey\Uuid\GuidView source
final class Guid extends Uuid {
public function __construct(Fields $fields, NumberConverterInterface $numberConverter, CodecInterface $codec, TimeConverterInterface $timeConverter) {
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 | ||
Guid::__construct | public | function | Creates a universally unique identifier (UUID) from an array of fields | Overrides Uuid::__construct | |
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 |