nakroma/cereal
Composer 安装命令:
composer require nakroma/cereal
包简介
Random and unique key generation.
README 文档
README
Cereal
Cereal generates random unique keys, for example as game or license keys.
Usage
use Nakroma\Cereal; Cereal::generate(); // Output: B539-F8B7-943B-BAF5-82F6-CCF7-5ACB-B4A2
Configuration
You can pass Cereal::generate() a bunch of options in an array, like this:
Cereal::generate(['length' => 16, 'uppercase' => false]);
These are all the options you can use and their default values:
length: 32 // Changes the length of the string // 16 => D423-3332-2919-D000 delimiter: '-' // Changes the char between each chunk // '@' => FDB2@4C41@C6DD@0B99@7FBD@ADF5@3345@058E delimiterSpacing: 4 // Changes the chunk size after before each delimiter // 8 => EA989521-282013EA-49B8D6CB-90DA28D8 uppercase: true // Changes if the string is upper or lower case // false => c724-bbb9-b205-0995-d8b8-3d65-0e4d-6c3b numbers: true // Enables the generation of numbers in the key // false => VHUX-CDDE-CFFG-NKSC-SDEK-LFWX-OBCW-IOZC chars: true // Enables the generation of chars in the key // false => 7222-2371-3276-8402-7594-0803-3961-6800
Installation
Run composer require nakroma/cereal
nakroma/cereal 适用场景与选型建议
nakroma/cereal 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 102 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 03 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 nakroma/cereal 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nakroma/cereal 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 102
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-15