Skip to content
/ uuid Public

Generate a UUID according to the RFC 4122 standard. Only support for version 5 UUID are built-in.

License

Notifications You must be signed in to change notification settings

fkulakov/uuid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uuid Generator

Total Downloads codecov Build Status Code Quality

Class to generate a universally unique identifier (UUID) according to the RFC 4122 standard. Only support for version 5 UUIDs are built-in.

Installation

composer require fkulakov/uuid dev-master

Usage

For a repeatable generate a UUID from some $source string use source() method:

Uuid::source($source)->generate();

For unrepeatable generate a random UUID use random() method:

Uuid::random()->generate();

For change namespace use setNamespace() method:

Uuid::random()->setNamespace($namespace)->generate(); 
Uuid::source($source)->setNamespace($namespace)->generate(); 
Uuid::random()->setNamespace($namespace)->generate(); 

NAMESPACE_DNS is used by default.

Notes

The UUID specification: http://tools.ietf.org/html/rfc4122.

About

Generate a UUID according to the RFC 4122 standard. Only support for version 5 UUID are built-in.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages