2017 © Pedro Peláez
 

library druid

An RFC-4122 compliant library for generating and parsing universally unique identifiers (UUIDs).

image

icecave/druid

An RFC-4122 compliant library for generating and parsing universally unique identifiers (UUIDs).

  • Thursday, April 28, 2016
  • by jmalloc
  • Repository
  • 2 Watchers
  • 4 Stars
  • 11,969 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 5 % Grown

The README.md

Druid

This project has been deprecated by the authors. Use ramsey/uuid instead., (*1)

Druid is an [RFC-4122] compliant PHP library for generating and parsing universally unique identifiers (UUIDs)., (*2)

composer require icecave/druid

Examples

Druid provides a generator class for each supported UUID version. UUIDs are created by first instantiating the generator for the desired UUID version, then calling the create() method., (*3)

All generator classes implement the UuidGeneratorInterface interface, and produce UUIDs that implement UuidInterface., (*4)

Generating UUIDs

Version 1 - Network address and time based identifier

// Not yet implemented.

Version 2 - Network address and time based identifier, with POSIX user information

// Not yet implemented.

Version 3 - Named-based MD5 hash identifer

// Not yet implemented.

Version 4 - Randomly generated identifier

$generator = new Icecave\Druid\UuidVersion4Generator;
$uuid = $generator->generate();

assert($uuid instanceof Icecave\Druid\UuidInterface);

Version 5 - Name-based SHA-1 identifier

// Not yet implemented.

Parsing UUIDs

UUIDs can be constructed from hexadecimal strings and binary buffers using the Uuid::fromString() and Uuid::fromBinary() methods, respectively., (*5)

$uuidFromString = Icecave\Druid\Uuid::fromString(
    '550e8400-e29b-41d4-a716-446655440000'
);

$uuidFromBinary = Icecave\Druid\Uuid::fromBinary(
    "\x55\x0e\x84\x00\xe2\x9b\x41\xd4\xa7\x16\x44\x66\x55\x44\x00\x00"
);

The Versions

28/04 2016

dev-develop

dev-develop https://github.com/IcecaveStudios/druid

An RFC-4122 compliant library for generating and parsing universally unique identifiers (UUIDs).

  Sources   Download

MIT

The Requires

 

The Development Requires

uuid guid unique id random universal global rfc-4122 universally identifer rfc4122 4122

08/11 2014

dev-master

9999999-dev https://github.com/IcecaveStudios/druid

An RFC-4122 compliant library for generating and parsing universally unique identifiers (UUIDs).

  Sources   Download

MIT

The Requires

 

The Development Requires

uuid guid unique id random universal global rfc-4122 universally identifer rfc4122 4122

08/11 2014

1.0.1

1.0.1.0 https://github.com/IcecaveStudios/druid

An RFC-4122 compliant library for generating and parsing universally unique identifiers (UUIDs).

  Sources   Download

MIT

The Requires

 

The Development Requires

uuid guid unique id random universal global rfc-4122 universally identifer rfc4122 4122

09/09 2014

1.0.0

1.0.0.0 https://github.com/IcecaveStudios/druid

An RFC-4122 compliant library for generating and parsing universally unique identifiers (UUIDs).

  Sources   Download

MIT

The Requires

 

The Development Requires

uuid guid unique id random universal global rfc-4122 universally identifer rfc4122 4122

14/10 2013

0.1.0

0.1.0.0 https://github.com/IcecaveStudios/druid

An RFC-4122 compliant library for generating and parsing universally unique identifiers (UUIDs).

  Sources   Download

MIT

The Requires

 

The Development Requires

uuid guid unique id random universal global rfc-4122 universally identifer rfc4122 4122