\Horde_Text_Filter_Highlightquotes

Highlights quoted messages with different colors for the different quoting levels.

CSS class names called "quoted1" ... "quoted{$cssLevels}" must be present.

The text to be passed in must have already been passed through htmlspecialchars().

Parameters:

'citeblock'  -- Display cite blocks?
                DEFAULT: true
'cssLevels'  -- Number of defined CSS class names.
                DEFAULT: 5
'hideBlocks' -- Hide large quoted text blocks by default?
                DEFAULT: false

Copyright 2004-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
__construct()
preProcess()
getPatterns()
postProcess()
No public properties found
No constants found
_process()
_beginLargeBlock()
_endLargeBlock()
_removeBr()
$_params
$_qlimit
N/A
No private methods found
No private properties found
N/A

Properties

$_params

$_params : array

Filter parameters.

Type

array

$_qlimit

$_qlimit : integer

The number of quoted lines to exceed to trigger large block processing.

Type

integer

Methods

__construct()

__construct(array  $params = array()) 

Constructor.

Parameters

array $params

Any parameters that the filter instance needs.

preProcess()

preProcess(string  $text) : string

Executes any code necessaray before applying the filter patterns.

Parameters

string $text

The text before the filtering.

Returns

string —

The modified text.

getPatterns()

getPatterns() : array

Returns a hash with replace patterns.

Returns

array —

Patterns hash.

postProcess()

postProcess(string  $text) : string

Executes any code necessaray after applying the filter patterns.

Parameters

string $text

The text after the filtering.

Returns

string —

The modified text.

_process()

_process(array  $lines, integer  $qcount) : string

Process a batch of lines at the same quoted level.

Parameters

array $lines

Lines.

integer $qcount

Number of lines in quoted level.

Returns

string —

The rendered lines.

_beginLargeBlock()

_beginLargeBlock(array  $lines, integer  $qcount) : string

Add HTML code at the beginning of a large block of quoted lines.

Parameters

array $lines

Lines.

integer $qcount

Number of lines in quoted level.

Returns

string —

HTML code.

_endLargeBlock()

_endLargeBlock(array  $lines, integer  $qcount) : string

Add HTML code at the end of a large block of quoted lines.

Parameters

array $lines

Lines.

integer $qcount

Number of lines in quoted level.

Returns

string —

HTML code.

_removeBr()

_removeBr(array  $lines) : array

Remove leading and trailing BR tags.

Parameters

array $lines

An array of text.

Returns

array —

The array with bare BR tags removed at the beginning and end.