himpun / utc-random
This package is abandoned and no longer maintained.
No replacement package was suggested.
PHP implementation of the CouchDB 'utc-random' algorithm.
1.0.1
2018-01-16 12:52 UTC
Requires
- php: >=7.1.0
Requires (Dev)
- phpbench/phpbench: ^0.14.0
- phpunit/phpunit: ^6.5
- squizlabs/php_codesniffer: ^3.2
This package is auto-updated.
Last update: 2018-06-27 03:53:42 UTC
README
This library is the PHP port of the CouchDB utc-random
UUID algorithm. The primary purpose of this library is used as distributed ID generation in PHP application for scalability purposes.
Installation
Installation can be easily done through composer require
command at the root of the project.
composer require himpun/utc-random
Quickstart
// Include composer autoload
require 'vendor/autoload.php';
// Generate UUID through object instance
$utcRandom = new Himpun\UtcRandom;
$uuid = $utcRandom->generate();
// or through static method
$uuid = Himpun\UtcRandom::generate();
License
This library is licensed under MIT as shown below. Exact copy of the license can be found in LICENSE
file.
MIT License
Copyright (c) 2018 Himpun
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.