Docs Goabase

TextLine
in package

Table of Contents

Properties

$charactersPerLine  : int
$prefix  : string
$text  : string

Methods

__construct()  : mixed
formatTextToLines()  : string
Wraps lines after $nChar characters and sets a break exclusively between individual words.
getLines()  : string
Get the first lines of a text, no empty lines, removes line break
handleLineBreaks()  : string
processParagraphs()  : string
reassembleLongParagraph()  : string
splitToParagraphs()  : array<string|int, mixed>

Properties

$charactersPerLine

private int $charactersPerLine

Methods

__construct()

public __construct(string $text[, int $charactersPerLine = 72 ][, string $prefix = '' ]) : mixed
Parameters
$text : string
$charactersPerLine : int = 72
$prefix : string = ''

formatTextToLines()

Wraps lines after $nChar characters and sets a break exclusively between individual words.

public formatTextToLines() : string
Return values
string

getLines()

Get the first lines of a text, no empty lines, removes line break

public getLines([int $lines = 4 ]) : string
Parameters
$lines : int = 4
Return values
string

handleLineBreaks()

private handleLineBreaks() : string
Return values
string

processParagraphs()

private processParagraphs(array<string|int, mixed> $paragraphs) : string
Parameters
$paragraphs : array<string|int, mixed>
Return values
string

reassembleLongParagraph()

private reassembleLongParagraph(string $paragraph) : string
Parameters
$paragraph : string
Return values
string

splitToParagraphs()

private splitToParagraphs(mixed $lineBreakPlaceholder) : array<string|int, mixed>
Parameters
$lineBreakPlaceholder : mixed
Return values
array<string|int, mixed>

        
On this page

Search results