PHP Classes

File: docs/framework-integration.rst

Recommend this page to a friend!
  Packages of A. B. M. Mahmudul Hasan   UID (UUID, ULID, Snowflake, Sonyflake, Nano, CUID, KSUID, XID, TBSL)   docs/framework-integration.rst   Download  
File: docs/framework-integration.rst
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: UID (UUID, ULID, Snowflake, Sonyflake, Nano, CUID, KSUID, XID, TBSL)
Generate, parse, validate unique identifiers
Author: By
Last change:
Date: 8 days ago
Size: 1,047 bytes
 

Contents

Class file image Download
Framework Integration ===================== Laravel ------- - Helper functions are available through Composer autoload. - Prefer UUIDv7 or ULID for ordered primary keys. - Keep IDs as strings in application boundaries; convert to binary only at persistence edges. Symfony ------- - Helper functions are available through Composer autoload. - Prefer central generation through ``Infocyph\\UID\\Id`` inside services. Generic PHP Apps ---------------- - Use ``Id::nanoId()`` for short public IDs. - Use ``Id::deterministic()`` for stable IDs from payloads. - Use config objects for policy/output tuning: - ``SnowflakeConfig`` - ``SonyflakeConfig`` - ``TBSLConfig`` - Use value objects for richer domain models: - ``UuidValue`` - ``UlidValue`` - ``SnowflakeValue`` - ``SonyflakeValue`` - ``TbslValue`` Distributed Sequence Coordination --------------------------------- For PSR-16 cache providers in distributed environments, use ``PsrSimpleCacheSequenceProvider`` with a synchronizer callback backed by a distributed lock.