PHP Classes

How to Use a PHP UUID Generator Class to Generate Human Readable UUID Values Using the Tool Package UUIDifier: Encode and decode UUIDs with a prefix and a number

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-12-13 (22 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
uuidifier 1.0MIT/X Consortium ...7Tools, Text processing, PHP 7
Description 

Author

This package can encode and decode UUIDs with a prefix and a number.

It provides a tool that can be executed from the command line console to encode and decode UUID values.

The tool can take a prefix string and an integer and output a UUID value generated by a package class.

It can also take a UUID value generated by the same package class and parse it to extract the prefix string and the integer number.

Picture of Chun-Sheng, Li
  Performance   Level  
Name: Chun-Sheng, Li <contact>
Classes: 39 packages by
Country: Taiwan Taiwan
Innovation award
Innovation award
Nominee: 17x

Winner: 1x

Example

<?php

use Symfony\Component\Console\Application;
use
Teamleader\Uuidifier\Command\Encode;

require_once
__DIR__ . '/../vendor/autoload.php';

$application = new Application();
$application->add(new Encode());

$application->run();


Details

Embed incremental ids inside special uuids.

Installation

Install using composer:

composer require teamleadercrm/uuidifier

Console command

To do some quick encoding, we have a console command:

php bin/console uuidifier:encode {prefix} {id}

e.g.

php bin/console uuidifier:encode InvoiceId 1

will give you

Id 1 with prefix InvoiceId encodes as ac42e979-4cf9-0f3c-8616-6ff689592c91

  Files folder image Files (8)  
File Role Description
Files folder imagebin (1 file)
Files folder imagesrc (1 file, 1 directory)
Files folder imagetests (1 file)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (8)  /  bin  
File Role Description
  Accessible without login Plain text file console Example Example script

  Files folder image Files (8)  /  src  
File Role Description
Files folder imageCommand (1 file)
  Plain text file Uuidifier.php Class Class source

  Files folder image Files (8)  /  src  /  Command  
File Role Description
  Plain text file Encode.php Class Class source

  Files folder image Files (8)  /  tests  
File Role Description
  Plain text file UuidifierTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0