From ead6389fc296aee6c2174e5bcb2f983df31d3efd Mon Sep 17 00:00:00 2001 From: "A. B. M. Mahmudul Hasan" Date: Tue, 4 Mar 2025 14:52:20 +0600 Subject: [PATCH] uid: tbsl, sequence --- README.md | 5 +++++ src/TBSL.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b7b4f0f..53a14ec 100644 --- a/README.md +++ b/README.md @@ -336,6 +336,11 @@ tbsl(); // returns [isValid, time => DateTimeInterface object, machine_id] \Infocyph\UID\TBSL::parse($tbsl); ``` +- Getting unique sequence + +```php +tbsl(0, true); // send true in 2nd parameter to enable sequence +``` ### RandomId diff --git a/src/TBSL.php b/src/TBSL.php index 70c50d4..1bd7857 100644 --- a/src/TBSL.php +++ b/src/TBSL.php @@ -9,7 +9,7 @@ final class TBSL { use GetSequence; - private static int $maxSequenceLength = 10; + private static int $maxSequenceLength = 7; /** * Generates a unique identifier using the TBSL algorithm.