derekisbusy/yii2-haikunator
Composer 安装命令:
composer require derekisbusy/yii2-haikunator
包简介
Generate Heroku-like random names to use in your Yii2 php applications.
README 文档
README
Generate Heroku-like random names to use in your PHP applications.
This package has been forked from the original HaikunatorPHP repository and modified to work with the Yii2 autoloader.
Installation
composer require derekisbusy/yii2-haikunator
Usage
Haikunator is pretty simple.
use derekisbusy\haikunator\Haikunator; // default usage Haikunator::haikunate() // => "wispy-dust-1337" // custom length (default=4) Haikunator::haikunate(["tokenLength" => 6]) // => "patient-king-887265" // use hex instead of numbers Haikunator::haikunate(["tokenHex" => true]) // => "purple-breeze-98e1" // use custom chars instead of numbers/hex Haikunator::haikunate(["tokenChars" => "HAIKUNATE"]) // => "summer-atom-IHEA" // don't include a token Haikunator::haikunate(["tokenLength" => 0]) // => "cold-wildflower" // use a different delimiter Haikunator::haikunate(["delimiter" => "."]) // => "restless.sea.7976" // no token, space delimiter Haikunator::haikunate(["tokenLength" => 0, "delimiter" => " "]) // => "delicate haze" // no token, empty delimiter Haikunator::haikunate(["tokenLength" => 0, "delimiter" => ""]) // => "billowingleaf" // custom nouns and/or adjectives Haikunator::$ADJECTIVES = ["red", "green", "blue"]; Haikunator::$NOUNS = ["reindeer"]; Haikunator::haikunate(); // => "blue-reindeer-4252"
Options
The following options are available:
Haikunator::haikunate([ "delimiter" => "-", "tokenLength" => 4, "tokenHex" => false, "tokenChars" => "0123456789" ]); // get/set nouns or adjectives Haikunator::$ADJECTIVES Haikunator::$NOUNS
If tokenHex is true, it overrides any tokens specified in tokenChars
Contributing
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
Other Languages
Haikunator is also available in other languages. Check them out:
- Node: https://github.com/Atrox/haikunatorjs
- .NET: https://github.com/Atrox/haikunator.net
- Python: https://github.com/Atrox/haikunatorpy
- Java: https://github.com/Atrox/haikunatorjava
- Dart: https://github.com/Atrox/haikunatordart
- Ruby: https://github.com/usmanbashir/haikunator
- Go: https://github.com/yelinaung/go-haikunator
derekisbusy/yii2-haikunator 适用场景与选型建议
derekisbusy/yii2-haikunator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 395 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 10 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「generator」 「user」 「random」 「username」 「yii2」 「nickname」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 derekisbusy/yii2-haikunator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 derekisbusy/yii2-haikunator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 derekisbusy/yii2-haikunator 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Memio's PrettyPrinter, used to generate PHP code from given Model
Faker Japanese is a Faker provider that generates fake Japanese related data for you.
Gambling Algorithms for Certification.
Standalone replacement for php's native get_browser() function
Reusable utilities library for Lacus Solutions' packages (type description, HTML escaping, random sequences)
Random string generator
统计信息
- 总下载量: 395
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 26
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPLv3
- 更新时间: 2015-10-31