It's defined in $uuid = Uuid ::v6() // $uuid is an instance of Symfony\Component\Uid\UuidV6 // UUID version 7 features a time-ordered value field derived from the well known // Unix Epoch timestamp source: the number of seconds since midnight UTC, leap seconds excluded. It's lexicographically sortable // (like ULIDs) and contains a 60-bit timestamp and 63 extra unique bits. $uuid = Uuid ::v3( $namespace, $name) // $uuid is an instance of Symfony\Component\Uid\UuidV3 $uuid = Uuid ::v5( $namespace, $name) // $uuid is an instance of Symfony\Component\Uid\UuidV5 // the namespaces defined by RFC 4122 (see ) // are available as PHP constants and as string values $uuid = Uuid ::v3(Uuid ::NAMESPACE_DNS, $name) // same as: Uuid::v3('dns', $name) $uuid = Uuid ::v3(Uuid ::NAMESPACE_URL, $name) // same as: Uuid::v3('url', $name) $uuid = Uuid ::v3(Uuid ::NAMESPACE_OID, $name) // same as: Uuid::v3('oid', $name) $uuid = Uuid ::v3(Uuid ::NAMESPACE_X500, $name) // same as: Uuid::v3('x500', $name) // UUID type 6 is not yet part of the UUID standard. a Type 4 UUID) // and the name is an arbitrary string (e.g. Type 3 uses // MD5 hashes and Type 5 uses SHA-1. $uuid = Uuid ::v4() // $uuid is an instance of Symfony\Component\Uid\UuidV4 // UUID type 3 and 5 generate a UUID hashing the given namespace and name. $uuid = Uuid ::v1() // $uuid is an instance of Symfony\Component\Uid\UuidV1 // UUID type 4 generates a random UUID, so you don't have to pass any constructor argument. Both are obtained automatically, so you don't have to pass any constructor argument. UUID type 1 generates the UUID using the MAC address of your device and a timestamp.
0 Comments
Leave a Reply. |