Download the PHP
package gildrd/name-generator without Composer
On this page you can find all versions of the php package
gildrd/name-generator. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor gildrd Package name-generator Short Description A name generator using markov chain License
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.
Generate names following Markov algorithm. This way, you will have names that looks "realistic" and not just a random succession of letters.
The way names are generated is only statistic. The more names you have in a list, the more "realitic" the result wille be. Of course,
some strange results can occur.
How markov chains work
Each names are analysed and an array is generated, indicating what are the probability a letter is followed by another specific letter.
Per exemple, if you have two words 'aa' and 'ab' :
First letter will be 'a'
'a' will be followed by another 'a', a 'b', or will be the last letter with 33% chance each.
'b' will be the last letter
How to install
Use composer to simply add this package to your project:
How to use
There are several ways to use this package:
By using built-in names lists
This package comes with some names lists: elves, dwarves and for Warhammer 40K. Others will be added later.
You can use one or more list as references to generate new names:
By using your own list
If you don't like the lists included, you can work with your own lists. These can be PHP array or JSON.
Array list
JSON list
Setting up some parameters
There are some parameters you can set:
mininimum length: by default, the shortest name of your list
maximum length: by default, the longest name of your list
can a letter be three times in a row: by default false to avoid names such as 'aellla'
can be a name without vowels: by default false to avoid names such as 'rvrk'
To configure your parameters, create a new Parameter instance:
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 gildrd/name-generator contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.