Download the PHP package joshtronic/php-loremipsum without Composer
On this page you can find all versions of the php package joshtronic/php-loremipsum. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download joshtronic/php-loremipsum
More information about joshtronic/php-loremipsum
Files in joshtronic/php-loremipsum
Package php-loremipsum
Short Description Lorem ipsum generator in PHP without dependencies
License MIT
Homepage https://github.com/joshtronic/php-loremipsum
Informations about the package php-loremipsum
php-loremipsum
Lorem ipsum generator in PHP without dependencies. Compatible with PHP 5.3+.
Installation
The preferred installation method is via composer
. First add the following to
your composer.json
:
Then run composer update
.
Usage
Getting Started
Generating Words
Generating Sentences
Generating Paragraphs
Wrapping Text with HTML Tags
If you would like to wrap the generated text with a tag, pass it as the second parameter:
Multiple tags can also be specified:
And you can back reference using $1
:
Return as an Array
Perhaps you want an array instead of a string:
You can still wrap with markup when returning an array:
Assumptions
The first string generated will always start with the traditional "Lorem ipsum dolor sit amet, consectetur adipiscing elit". Subsequent strings may contain those words but will not explicitly start with them.
Contributing
Suggestions and bug reports are always welcome, but karma points are earned for pull requests.
Unit tests are required for all contributions. You can run the test suite from
the project's root directory simply by running phpunit
.
Credits
php-loremipsum
was originally inspired by
badcow/lorem-ipsum with a
goal of being a dependency free lorem ipsum generator with flexible generation
options.
License
MIT