Download the PHP package iliain/php-zoo-ids without Composer

On this page you can find all versions of the php package iliain/php-zoo-ids. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-zoo-ids

php-zoo-ids

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

A PHP version of bryanmylee's zoo-ids, originally written in JavaScript, which was in turn inspired by the URL ID's of gfycat.com. For a frontend or backend that uses JavaScript, I highly recommend you use their package!

Generate predictable and unique identifiers composed of adjectives and animal names, with the ability to seed the random identifiers.

Range of IDs

Currently, there are 1347 adjectives and 221 animals. The more adjectives used, the more possible combinations of IDs available.

For a quick reference, with 2 adjectives used, there are 400,984,389 possible unique IDs.

With 3 adjectives, there are 540,125,971,983 possible unique IDs.

Installation

Usage

Examples

If you want to control the list of Nouns and Adjectives, you can provide your own:

Documentation

new UsernameRandomizer($adjectives, $nouns)

adjectives: array

An array of adjectives to use in generation. Defaults to preprovided list if none are specified.

nouns: array

An array of nouns to use in generation. Defaults to preprovided list if none are specified.

generateID($seed, $numAdjectives, $delimiter, $caseStyle)

seed: string|int

The seed used to generate the id. This allows us to generate predictable, but random and unique identifiers.

Defaults to the current time.

numAdjectives: int

The number of adjectives to use in the identifier.

Defaults to 2.

delimiter: string

The delimiter used between words. The delimiter will also be used between multi-word adjectives.

Defaults to ''.

caseStyle: string

The case style for the words. Possible options are 'titlecase', 'camelcase', 'uppercase', 'lowercase', and 'togglecase'.

Defaults to 'titlecase'.

Credits

All credit goes to Bryan Lee and his zoo-ids package. I wanted a version of this to use in PHP (username generation was handled by a PHP CMS), and converted the majority of his existing code to that format. Currently lacking some of his original features, such as the ability to use objects as seeds.


All versions of php-zoo-ids with dependencies

PHP Build Version
Package Version
Requires php Version ^7 || ^8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package iliain/php-zoo-ids contains the following files

Loading the files please wait ....