2017 © Pedro Peláez
 

library uuid

A PHP UUID implementation

image

cxj/uuid

A PHP UUID implementation

  • Thursday, July 23, 2015
  • by cxj
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

uuid

Provides a native PHP implementation of UUID creation., (*1)

This class supports version 4 (random) and version 5 (SHA-1) UUID generation algorithms. It generates the DCE 1.1 variant UUID, the most common outside of Microsoft environments., (*2)

The UUIDs generated are RFC 4122 compliant., (*3)

Introduction

Installation

This class only requires PHP 4 or later, but we recommend using the latest available version of PHP as a matter of principle. It has no dependencies., (*4)

It is installable and autoloadable via Composer as [cxj/uuid] (https://packagist.org/packages/cxj/uuid)., (*5)

Alternatively, [download a release] (https://github.com/cxj/uuid/releases) or clone this repository, then require or include its autoload.php file., (*6)

Quality

This class attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request., (*7)

Design Goals

This class was designed to cover only the most common use cases, and to be small and lightweight. Hence, there are some features it does not provide., (*8)

In particular:, (*9)

  • It does not provide a version 1 (MAC address) implementation, because there is no reliable and lightweight method to obtain the MAC address from PHP. There are also criticisms of version 1 which make it less desirable., (*10)

  • Version 2 (DCE Security) is also not presently implemented. The need for this version appears small., (*11)

  • It does not provide a version 3 (MD5) implementation. MD5 has been shown to have weaknesses, and version 5 (SHA-1) is recommended for usage instead., (*12)

  • It is a UUID generator, so very little UUID parsing and validation is part of the code at present., (*13)

Usage

The UUID generation methods are static, so simply call them as shown below., (*14)


Contributing

Pull requests are welcome!, (*15)

Requests which follow the PSR-1 and PSR-2 coding and style standards, and which have PHPUnit test coverage will get most attention., (*16)

The Versions

23/07 2015

dev-master

9999999-dev https://github.com/cxj/uuid

A PHP UUID implementation

  Sources   Download

BSD-2-Clause

uuid

23/07 2015

v1.0.1

1.0.1.0 https://github.com/cxj/uuid

A PHP UUID implementation

  Sources   Download

BSD-2-Clause

uuid

02/06 2015

v1.0.0

1.0.0.0 https://github.com/cxj/uuid

A PHP UUID implementation

  Sources   Download

BSD-2-Clause

uuid