public function addParagraph($paragraph, $styles = array())
	{
		// Sanitize the given text of new lines, double spaces, and tabs
		$paragraph = str_replace("\n", " ", $paragraph);
		$paragraph = str_replace("  ", " ", $paragraph);
		$paragraph = str_replace("\t", "", $paragraph);

		// Now check if the paragraph is longer than 70 characters and subdivide as appropriate
		do
		{
			if (strlen($paragraph) > 70 && $break = strpos($paragraph, " ", 70))
			{
				$message   = substr($paragraph, 0, $break);
				$paragraph = trim(substr($paragraph, $break));
			}
			else
			{
				$message = trim($paragraph);
				$break   = false;
			}

			// Add the individual line
			$this->addLine($message, $styles);
		}
		while ($break !== false);

		return $this;
	}
public function addParagraph($paragraph, $styles = array())
	{
		// Sanitize the given text of new lines, double spaces, and tabs
		$paragraph = str_replace("\n", " ", $paragraph);
		$paragraph = str_replace("  ", " ", $paragraph);
		$paragraph = str_replace("\t", "", $paragraph);

		// Now check if the paragraph is longer than 70 characters and subdivide as appropriate
		do
		{
			if (strlen($paragraph) > 70 && $break = strpos($paragraph, " ", 70))
			{
				$message   = substr($paragraph, 0, $break);
				$paragraph = trim(substr($paragraph, $break));
			}
			else
			{
				$message = trim($paragraph);
				$break   = false;
			}

			// Add the individual line
			$this->addLine($message, $styles);
		}
		while ($break !== false);

		return $this;
	}
public function addParagraph ( $ paragraph , $ styles = array ( ) ) { // Sanitize the given text of new lines, double spaces, and tabs $ paragraph = str_replace ( "\n" , " " , $ paragraph ) ; $ paragraph = str_replace ( "  " , " " , $ paragraph ) ; $ paragraph = str_replace ( "\t" , "" , $ paragraph ) ; // Now check if the paragraph is longer than 70 characters and subdivide as appropriate do { if ( strlen ( $ paragraph ) > 70 && $ break = strpos ( $ paragraph , " " , 70 ) ) { $ message = substr ( $ paragraph , 0 , $ break ) ; $ paragraph = trim ( substr ( $ paragraph , $ break ) ) ; } else { $ message = trim ( $ paragraph ) ; $ break = false ; } // Add the individual line $ this -> addLine ( $ message , $ styles ) ; } while ( $ break !== false ) ; return $ this ; }
Add a paragraph to the output buffer.
This will chop the text up to maintain lines of approximately 80 characters.

@param   string  $paragraph  Text to be chopped into lines and stored
@param   mixed   $styles     Array of custom styles or string containing predefined term (see formatLine() for posibilities)
@return  $this
Add a paragraph to the output buffer . This will chop the text up to maintain lines of approximately 80 characters .