eve/uuid
Composer 安装命令:
composer require eve/uuid
包简介
eve's simple Ramsey UUID wrapper
README 文档
README
A simple wrapper for the great ramsey/uuid package.
Installation
Require the package with Composer:
compose require eve/uuid
Usage
For the sake of simplicity and internal usage, eve's Uuid class only deals with Ramsey\Uuid v4 as strings. Any more advanced usage will have to be done directly with Ramsey\Uuid.
use Eve\Uuid\Uuid; // Generate a UUID string $uuid = Uuid::generate(); // The package also comes with a handy global function $uuid = uuid(); // Freeze the next generated value, useful for testing $frozenValue = Uuid::freeze(); assert(Uuid::generate() === $frozenValue); // true // You can also supply a custom value for freezing Uuid::freeze('dummy'); assert(Uuid::generate() === 'dummy'); // true // "Reset" UUID generation to normal. This can for example be put in PHPUnit's `tearDown` method. Uuid::unfreeze();
License
MIT, of course.
统计信息
- 总下载量: 15.01k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-11-26
