magyarjeti/loripsum-client

Lorem ipsum generator.

This package's canonical repository appears to be gone and the package has been frozen as a result.

Installs: 18 365

Dependents: 1

Suggesters: 0

Security: 0

Stars: 6

Watchers: 5

Forks: 0

Language:JavaScript

v2.0 2014-10-09 15:07 UTC

This package is not auto-updated.

Last update: 2024-04-23 01:50:36 UTC


README

Build Status

Lorem ipsum generator based on the loripsum.net API.

Installation

Requirements

  • PHP 5.3+
  • cURL extension

With Composer

Create the following composer.json file and run the php composer.phar install command to install it.

{
    "require": {
        "magyarjeti/loripsum-client": "*"
    }
}
<?php

require 'vendor/autoload.php';

use Magyarjeti\Loripsum\Client;
use Magyarjeti\Loripsum\Http\CurlAdapter;

$client = new Client(new CurlAdapter);

Usage

Generate five paragraph HTML text with headers, link and unordered list:

$client->headers()->link()->ul()->html(5);

Generate three short plain text paragraph:

$client->short()->text(3);

Text formatting options

  • short, medium, long, verylong - The average length of a paragraph.
  • decorate - Add bold, italic and marked text.
  • link - Add links.
  • ul - Add unordered lists.
  • ol - Add numbered lists.
  • dl - Add description lists.
  • bq - Add blockquotes.
  • code - Add code samples.
  • headers - Add headers.
  • allcaps - Use ALL CAPS.
  • prude - Prude version.

Author

Magyar Jeti Zrt.

License

Loripsum client is licensed under the MIT License - see the LICENSE file for details!