private function _getParagraph($first = false)
    {
        $words = $this->_dictionary;
        shuffle($words);
        if ($first) {
            $pre = array('lorem', 'ipsum');
            $words = array_merge($pre, $words);
        }
        $nbrWordsPerParagraph = $this->_nbrWordsPerParagraph + mt_rand(-20, 20);
        $nbrWordsPerSentence = $this->_nbrWordsPerSentence + mt_rand(-8, 8);
        $words = array_slice($words, 0, $nbrWordsPerParagraph);
        $sentences = array_chunk($words, $nbrWordsPerSentence);
        $result = array();
        foreach ($sentences as &$sentence) {
            $this->_punctuate($sentence);
            $result[] = ucfirst(implode(' ', $sentence));
        }
        return ('<p>' . implode(' ', $result) . '</p>');
    }
private function _getParagraph($first = false)
    {
        $words = $this->_dictionary;
        shuffle($words);
        if ($first) {
            $pre = array('lorem', 'ipsum');
            $words = array_merge($pre, $words);
        }
        $nbrWordsPerParagraph = $this->_nbrWordsPerParagraph + mt_rand(-20, 20);
        $nbrWordsPerSentence = $this->_nbrWordsPerSentence + mt_rand(-8, 8);
        $words = array_slice($words, 0, $nbrWordsPerParagraph);
        $sentences = array_chunk($words, $nbrWordsPerSentence);
        $result = array();
        foreach ($sentences as &$sentence) {
            $this->_punctuate($sentence);
            $result[] = ucfirst(implode(' ', $sentence));
        }
        return ('<p>' . implode(' ', $result) . '</p>');
    }
private function _getParagraph ( $ first = false ) { $ words = $ this -> _dictionary ; shuffle ( $ words ) ; if ( $ first ) { $ pre = array ( 'lorem' , 'ipsum' ) ; $ words = array_merge ( $ pre , $ words ) ; } $ nbrWordsPerParagraph = $ this -> _nbrWordsPerParagraph + mt_rand ( - 20 , 20 ) ; $ nbrWordsPerSentence = $ this -> _nbrWordsPerSentence + mt_rand ( - 8 , 8 ) ; $ words = array_slice ( $ words , 0 , $ nbrWordsPerParagraph ) ; $ sentences = array_chunk ( $ words , $ nbrWordsPerSentence ) ; $ result = array ( ) ; foreach ( $ sentences as & $ sentence ) { $ this -> _punctuate ( $ sentence ) ; $ result [ ] = ucfirst ( implode ( ' ' , $ sentence ) ) ; } return ( '<p>' . implode ( ' ' , $ result ) . '</p>' ) ; }
Returns a paragraph.
@param    bool $first Is it the first paragraph?
@return    string    The HTML result.
Returns a paragraph .