ramsey/uuid
Introduction
What Is a UUID?
Getting Started
Requirements
Install With Composer
Using ramsey/uuid
RFC 4122 UUIDs
Version 1: Gregorian Time
Providing a Custom Node
Generating a Random Node
What’s a Clock Sequence?
Privacy Concerns
Version 2: DCE Security
Domains
Custom and Random Nodes
Clock Sequence
Problems With Version 2 UUIDs
Privacy
Limited Uniqueness
Lossy Timestamps
Version 3: Name-based (MD5)
Version 4: Random
Version 5: Name-based (SHA-1)
Custom Namespaces
Version 6: Reordered Time
Custom and Random Nodes
Clock Sequence
Version 1-to-6 Conversion
Ordered-time to Version 6 Conversion
Privacy Concerns
Version 7: Unix Epoch Time
Convert a Version 7 UUID to a ULID
Version 8: Custom
Nonstandard UUIDs
Version 6: Reordered Time
Globally Unique Identifiers (GUIDs)
Converting GUIDs to UUIDs
Other Nonstandard UUIDs
Using In a Database
Storing As a String
Storing As Bytes
Using As a Primary Key
Using As a Unique Key
Insertion Order and Sorting
Customization
Ordered-time Codec
Timestamp-first COMB Codec
Using a Custom Calculator
Using a Custom Validator
Replace the Default Factory
Testing With UUIDs
Inject a UUID of a Specific Type
Returning Specific UUIDs From a Static Method
Mocking UuidInterface
Upgrading ramsey/uuid
Version 3 to 4
What’s New?
What’s Changed?
Uuid Static Methods
Changed Return Types
Deprecations
UuidInterface
Uuid
Interface Changes
UuidInterface
UuidFactoryInterface
Builder\UuidBuilderInterface
Converter\TimeConverterInterface
Provider\TimeProviderInterface
Provider\NodeProviderInterface
Constructor Changes
Uuid
Builder\DefaultUuidBuilder
Provider\Node\FallbackNodeProvider
Provider\Time\FixedTimeProvider
Version 2 to 3
FAQs
How do I fix “rhumsaa/uuid is abandoned” messages?
Why does ramsey/uuid use
final
?
But Why?
Overriding Behavior
Testing With UUIDs
Reference
Uuid
UuidInterface
TimeBasedUuidInterface
Fields\FieldsInterface
Rfc4122\UuidInterface
Rfc4122\FieldsInterface
Rfc4122\UuidV1
Rfc4122\UuidV2
Rfc4122\UuidV3
Rfc4122\UuidV4
Rfc4122\UuidV5
Rfc4122\UuidV6
Rfc4122\UuidV7
Rfc4122\UuidV8
Rfc4122\Version
Guid\Fields
Guid\Guid
Nonstandard\Fields
Nonstandard\Uuid
Nonstandard\UuidV6
UuidFactoryInterface
Types
Exceptions
Helper Functions
Predefined Namespaces
Calculators
Validators
Variant
Copyright
ramsey/uuid for Enterprise
ramsey/uuid
»
Reference
»
Fields\FieldsInterface
Edit on GitHub
Fields\FieldsInterface
interface
Ramsey\Uuid\Fields\
FieldsInterface
Represents the fields of a UUID.
getBytes
(
)
Returns
The bytes that comprise these fields.
Return type
string
Read the Docs
v: 4.7.2
Versions
stable
4.7.2
4.7.1
4.7.0
4.6.0
4.5.1
4.5.0
4.4.0
4.3.0
4.2.0
4.1.0
4.x
4.0.0
Downloads
On Read the Docs
Project Home
Builds