- Notifications
You must be signed in to change notification settings - Fork12
Generate Heroku-like random names to use in your php applications.
License
NotificationsYou must be signed in to change notification settings
Atrox/haikunatorphp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Generate Heroku-like random names to use in your PHP applications.
composer require atrox/haikunator
Haikunator is pretty simple.
useAtrox\Haikunator;// default usageHaikunator::haikunate()// => "wispy-dust-1337"// custom length (default=4)Haikunator::haikunate(["tokenLength" =>6])// => "patient-king-887265"// use hex instead of numbersHaikunator::haikunate(["tokenHex" =>true])// => "purple-breeze-98e1"// use custom chars instead of numbers/hexHaikunator::haikunate(["tokenChars" =>"HAIKUNATE"])// => "summer-atom-IHEA"// don't include a tokenHaikunator::haikunate(["tokenLength" =>0])// => "cold-wildflower"// use a different delimiterHaikunator::haikunate(["delimiter" =>"."])// => "restless.sea.7976"// no token, space delimiterHaikunator::haikunate(["tokenLength" =>0,"delimiter" =>""])// => "delicate haze"// no token, empty delimiterHaikunator::haikunate(["tokenLength" =>0,"delimiter" =>""])// => "billowingleaf"// custom nouns and/or adjectivesHaikunator::$ADJECTIVES = ["red","green","blue"];Haikunator::$NOUNS = ["reindeer"];Haikunator::haikunate();// => "blue-reindeer-4252"
The following options are available:
Haikunator::haikunate(["delimiter" =>"-","tokenLength" =>4,"tokenHex" =>false,"tokenChars" =>"0123456789"]);// get/set nouns or adjectivesHaikunator::$ADJECTIVESHaikunator::$NOUNS
IftokenHex
is true, it overrides any tokens specified intokenChars
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs andsubmit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
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
- Go:https://github.com/Atrox/haikunatorgo
- Clojure:https://github.com/Atrox/haikunatorclj
- Dart:https://github.com/Atrox/haikunatordart
- Ruby:https://github.com/usmanbashir/haikunator
- Rust:https://github.com/nishanths/rust-haikunator
About
Generate Heroku-like random names to use in your php applications.
Topics
Resources
License
Stars
Watchers
Forks
Packages0
No packages published