Generates Lorem Ipsum text
author | etessore |
---|---|
version | 1.0.0 |
package | classes |
__toString()
defaults() : \LipsumGenerator
\LipsumGenerator
$this for chainabilityflush() : \LipsumGenerator
\LipsumGenerator
$this for chainabilityhook() : \LipsumGenerator
If the page has no content it will fill it with the generated text.
\LipsumGenerator
$this for chainabilityinit() : \LipsumGenerator
\LipsumGenerator
$this for chainabilityload() : boolean
boolean
false if config is not presentrender() : \LipsumGenerator
\LipsumGenerator
$this for chainabilitysave() : \LipsumGenerator
\LipsumGenerator
$this for chainabilityset_begins_with(array $beginning) : \LipsumGenerator
Usually they are 'Lorem ipsum'.
array
list of first n words
\LipsumGenerator
$this for chainabilityset_dictionary(\GeneratorDictionary $dictionary) : \LipsumGenerator
set_format(int $format) : \LipsumGenerator
see | \self::FORMAT_RICH_HTML |
---|---|
see | \self::FORMAT_HTML |
see | \self::FORMAT_TEXT |
see | \self::FORMAT_PLAIN |
int
the format
\LipsumGenerator
$this for chainabilityset_math(\GaussianMath $math)
\GaussianMath
set_min_repeat_count($min_repeat_count) : \LipsumGenerator
the number of words withour repetitions
\LipsumGenerator
$this for chainabilityset_number_of_paragraphs(int $number_of_paragraphs) : \LipsumGenerator
set_rich_html_config(array $config)
array
an array of parameters:
$default = array(
'strong' => array(
'percent' => 2,
'max_words' => 5,
'params' => ''
),
'a' => array(
'percent' => 5,
'max_words' => 5,
'params' => 'href="#"'
),
'em' => array(
'percent' => 10,
'max_words' => 5,
'params' => ''
)
);
set_words_per_paragraph(int $words_per_paragraph)
int
the number of words
set_words_per_sentence(int $words_per_sentence) : \LipsumGenerator
the_content($content)
string the content
force_beginning(array $sentences)
array
the list of sentences
gaussian_sentence()
Statistics Source: http://hearle.nahoo.net/Academic/Maths/Sentence.html Average: 24.46 Standard Deviation: 5.08
get_config() : array
array
the list of settingsget_paragraph()
get_words($count) : array
int the number of words to ber retrieved
array
a list of random wordsnumberOfCommas($len)
Average and standard deviation are determined superficially
int a medium amount of words between two commas
punctuate(array $sentence)
array
the list of sentence
set_config(array $config) : \LipsumGenerator
array
the list of settings pairs name=>value
\LipsumGenerator
$this for chainability$beginning : array
$format : string
$min_repeat_count : int
$number_of_paragraphs : int
$render : string
$rich_html_config : array
$seed : mixed
$words_per_paragraph : int
$words_per_sentence : int
FORMAT_HTML
const | int use html tag to separate paragraphs |
---|
FORMAT_PLAIN
const | int generates plain text with a newline as separation between paragraphs |
---|
FORMAT_TEXT
const | int use 2 newlines to separate paragraphs and a tab before the first word of every paragraph |
---|
OPTION_NAME
const | string the WP option name where the generator can store his config |
---|