Download the PHP package goclearsky/name-gen without Composer

On this page you can find all versions of the php package goclearsky/name-gen. 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 name-gen

NameGen plugin for CakePHP

A plugin to generate random names as can be needed during development.

Installation

You can install this plugin into your CakePHP application using composer.

Use

The Generator class defines the getNames function.

Size is the number of people's names you are requesting. Gender is a single character. Locale is in the form of the typical locale values. Currently available are en_US. The last parameter indicates the cardinality of each name generated. If middle names are desired, then use 3, otherwise 2 provides given and family names only.

If cardinality is 3, each name is checked to ensure the given and middle names are different. Irrespective of cardinality, the set is checked to ensure each name is unique.

Typical use might be to create a shell that requests a set of names using getNames, then saves them to your database tables as needed. Could also be used to quickly generate test source data.

The above shell generates the following output and saves these names in the users table;

Contributing

All suggestions and feedback are welcome. One thing that could help the general appeal of the plugin is to have more seeds for different countries.

Limitations / ToDo's

Add exception handling. The algorithm isn't exhaustive. It is possible to; a) request more names than are possible to uniquely provide based on the size of the pool to pull from, and b) request more names than are reasonable to return by simply randomly picking a name and checking for uniqueness. Because of this, can actually return a result set smaller than the number requested. If this is important, either check the set size upon return, or reduce the requested size in relation to the pool size. As it is, 5000 names can be generated in less than 1 second on 2012 hardware.


All versions of name-gen with dependencies

PHP Build Version
Package Version
Requires cakephp/cakephp Version ^3.4
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 goclearsky/name-gen contains the following files

Loading the files please wait ....