Download the PHP package malenki/fictif without Composer

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

Fictif

Create random fictive people or some of their informations to use as fake data.

Use Only The Classes

In order to generate what you want, into the more simple way, I have design this library into several small parts. So, if you want only generate fake passwords, you can.

To use my classes into your own project, the best way is to use composer. So, edit your composer.jsonand add this into require packages:

Birthday Class

Creating birthday dates is very simple. By default, this class can generate dates between 1900 and now, returning `string.

If you want, you can set minimal year and/or maximal year.

You can generate one like seen into previous examples, or many dates.

Simple, isn't it?

Email Class

This class is very flexible.

By default, will take randomly domain and extension, the account is generated or can be set.

So, domain and extension can be fixed (i.e. always the same at every generation), or you can put your sets too.

Like for Birthday class, you have generateOne() and generateMany() methods.

And, in string context, this class is like a string too.

FirstName and LastName Classes

This classes have a lot of french samples of many origins, so, you can get a great variety of first and last names!

Using FirstName class is very simple. To get one random firstname, do the following:

OK, but if you want femal firstnames only, you can do that:

For men, without surprise:

For names that can be both for women or men:

You can generate several at once too:

The LastName class use only takeOne() and takeMany() methods, and works the same way as FirstName class, including the toString() behavior too.

Login Class

This is very simple to use. Only two methods: generateOne() and generateMany(). As others classes, use the toString() behavior too.

This class generate login commposed of pseudo syllabs.

So, just for you, one example:

Password Class

Password Class allows you to play with length and characters.

You can give a minimal and/or maximal length:

If not set by you, the min/max are 5 and 20.

You can set the length to have always the same numbers of chars too:

You can add some characters…

or just use letters…

or just digits, as you want!

Putting it all together: The User Class

User class allows you to play with all previous classes together.

Each of them can be accessed by property. So, for example, to customize password, you can do that:

Simple, no?

But, if you want only some data, you can disable some of them by calling methods disableX() where X is the name of the property to disable. So, to disable login generator, just do:

As other classes, User class has generateOne() and generateMany(), but no toString() feature, and generateOne() return stdClass object.

Two other methods are avaible, to get json output:

Use The CLI App

Before using the CLI app, be sure you have PHP CLI and composer installed on your system.

Git

Download the source code of this project, or just git clone it.

Then, go to the root projects to execute this:

Composer only

You can use composer only

Usage

After that, you can do a simple ./fictif to have the list of all available options. I think that help available into this CLI script is enough, no need to do more blahblah here ;-)

Try it, you can output result as JSON, serialized PHP or CSV.

Following lines show you the --help option output:

Enjoy creating fake people!


All versions of fictif with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
malenki/argile Version *
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 malenki/fictif contains the following files

Loading the files please wait ....