Download the PHP package nilportugues/uuid without Composer
On this page you can find all versions of the php package nilportugues/uuid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nilportugues/uuid
More information about nilportugues/uuid
Files in nilportugues/uuid
Package uuid
Short Description Library to encapsulate the latest and more secure Uuid versions
License MIT
Homepage http://nilportugues.com
Informations about the package uuid
Uuid Generator
This class' intent is to encapsulate Uuid's latest and more secure versions removing the need to explicitly hard-code a Uuid version everywhere.
1. Installation
The recommended way to install the Uuid Generator is through Composer. Run the following command to install it:
2. Usage
Usage is real simple, you can create your Uuid right away or under certain namespaces.
2.1. Without namespacing
This is the most common case. Usage is straight-forward:
2.2. With namespacing
First of all, the following namespaces exists:
- DNS Namespace
- URL Namespace
- OID (Object Id) Namespace
- X500 Namespace
Code-wise it's use can be defined using a constant.
More on its usage can be found here: http://tools.ietf.org/html/rfc4122#appendix-C
2.3. Uuid versions
Currently Uuid has 5 versions and while all of them are valid, usage of newest versions is always preferred. Lastest preferred versions are:
- Uuid4 preferred over Uuid1.
- Uuid5 preferred over Uuid3 and Uuid1
3. Quality
To run the PHPUnit tests at the command line, go to the tests directory and issue phpunit.
This library attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request.
4. Author ↑
Nil Portugués Calderó
5. License ↑
The code base is licensed under the MIT license.