Download the PHP package uksarkar/petname-generator without Composer
On this page you can find all versions of the php package uksarkar/petname-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download uksarkar/petname-generator
More information about uksarkar/petname-generator
Files in uksarkar/petname-generator
Package petname-generator
Short Description A PHP package for generating random pet names.
License MIT
Informations about the package petname-generator
PetNameGenerator
PetNameGenerator is a simple and fun PHP library for generating random pet names. It combines adverbs, adjectives, and animal names to create unique and playful names for pets.
Installation
To install this package, use Composer:
Usage
After installation, you can use the PetNameGenerator
class to generate random pet names.
Basic Example
Custom Word Count and Separator
The generate
method allows you to specify the number of words in the name and the separator between words.
API
generate(int $wordCount = 2, string $separator = ' '): string
Generates a random pet name.
$wordCount
: (optional) The number of words in the generated name. Default is 1.$separator
: (optional) The separator to use between words. Default is a-
.
Returns: A string representing the generated pet name.
Customization
You can easily modify the source code to add more adverbs, adjectives, or animals to personalize the names generated by the library.
Contributing
Feel free to open issues or submit pull requests if you'd like to contribute. Contributions are always welcome!
License
This project is licensed under the MIT License. See the LICENSE file for details.
Enjoy generating fun names for pets!