Skip to content

baueri/lorum-ipse-faker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lórum Ipse fake text generator

With this package you can generate random sentences and paragraphs with made up Hungarian-like words.

This package uses the api of http://www.lorumipse.hu/ website. The text generating algorithm is developed by the Lórum Ipse team. The package only gets the generated text from the api url and parses it by the needs.

Please note that because of calling an external api url, getting a random text using this package might take a longer time.

Docs

Demo

When instantiating the faker, it already gives you a paragraph, a sentence and a single word, but you can generate a new one by calling them as methods (see below)

  $faker = Baueri\LorumIpse\LorumIpseFaker::make();

Getting a paragraph

  echo $faker->paragraph;

  //Calling as method. You can set the number of sentences you want to retrieve
  echo $faker->paragraph(4);

Getting a sentence with specific number of words

  echo $faker->sentence;
  
  //Calling as method, setting number of words as parameter
  echo $faker->sentence(10);

Get a single random word

  echo $faker->word;

  //or with a function (this generates a new word)
  echo $faker->word();

Installation

To install, you have to add the following lines to the composer

{
  "repositories": [
    {
        "url": "https://baueri@bitbucket.org/baueri/lorum-ipse-faker.git",
        "type": "git"
    }
  ],
  "require": {
       "baueri/lorum-ipse-faker": "dev-master"
    }
}

Then run

compser update

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages