Documentation

Horde_Text_Filter_Highlightquotes extends Horde_Text_Filter_Base
in package

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.

Tags
author

Michael Slusarz slusarz@horde.org

author

Jan Schneider jan@horde.org

category

Horde

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

$_params  : array<string|int, mixed>
Filter parameters.
$_qlimit  : int
The number of quoted lines to exceed to trigger large block processing.
__construct()  : mixed
Constructor.
getPatterns()  : array<string|int, mixed>
Returns a hash with replace patterns.
postProcess()  : string
Executes any code necessaray after applying the filter patterns.
preProcess()  : string
Executes any code necessaray before applying the filter patterns.
_beginLargeBlock()  : string
Add HTML code at the beginning of a large block of quoted lines.
_endLargeBlock()  : string
Add HTML code at the end of a large block of quoted lines.
_process()  : string
Process a batch of lines at the same quoted level.
_removeBr()  : array<string|int, mixed>
Remove leading and trailing BR tags.

Properties

$_params

Filter parameters.

protected array<string|int, mixed> $_params = array('citeblock' => \true, 'cssLevels' => 5, 'hideBlocks' => \false)

$_qlimit

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

protected int $_qlimit = 8

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
$params : array<string|int, mixed> = array()

Any parameters that the filter instance needs.

Return values
mixed

getPatterns()

Returns a hash with replace patterns.

public getPatterns() : array<string|int, mixed>
Return values
array<string|int, mixed>

Patterns hash.

postProcess()

Executes any code necessaray after applying the filter patterns.

public postProcess(string $text) : string
Parameters
$text : string

The text after the filtering.

Return values
string

The modified text.

preProcess()

Executes any code necessaray before applying the filter patterns.

public preProcess(string $text) : string
Parameters
$text : string

The text before the filtering.

Return values
string

The modified text.

_beginLargeBlock()

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

protected _beginLargeBlock(array<string|int, mixed> $lines, int $qcount) : string
Parameters
$lines : array<string|int, mixed>

Lines.

$qcount : int

Number of lines in quoted level.

Return values
string

HTML code.

_endLargeBlock()

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

protected _endLargeBlock(array<string|int, mixed> $lines, int $qcount) : string
Parameters
$lines : array<string|int, mixed>

Lines.

$qcount : int

Number of lines in quoted level.

Return values
string

HTML code.

_process()

Process a batch of lines at the same quoted level.

protected _process(array<string|int, mixed> $lines, int $qcount) : string
Parameters
$lines : array<string|int, mixed>

Lines.

$qcount : int

Number of lines in quoted level.

Return values
string

The rendered lines.

_removeBr()

Remove leading and trailing BR tags.

protected _removeBr(array<string|int, mixed> $lines) : array<string|int, mixed>
Parameters
$lines : array<string|int, mixed>

An array of text.

Return values
array<string|int, mixed>

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

Search results