PHP Class Horde_Text_Filter_Highlightquotes, horde

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-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Michael Slusarz ([email protected])
Author: Jan Schneider ([email protected])
Inheritance: extends Horde_Text_Filter_Base
Exibir arquivo Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_params array Filter parameters.
$_qlimit integer The number of quoted lines to exceed to trigger large block processing.

Public Methods

Method Description
getPatterns ( ) : array Returns a hash with replace patterns.
postProcess ( string $text ) : string Executes any code necessaray after applying the filter patterns.
preProcess ( string $text ) : string Executes any code necessaray before applying the filter patterns.

Protected Methods

Method Description
_beginLargeBlock ( array $lines, integer $qcount ) : string Add HTML code at the beginning of a large block of quoted lines.
_endLargeBlock ( array $lines, integer $qcount ) : string Add HTML code at the end of a large block of quoted lines.
_process ( array $lines, integer $qcount ) : string Process a batch of lines at the same quoted level.
_removeBr ( array $lines ) : array Remove leading and trailing BR tags.

Method Details

_beginLargeBlock() protected method

Add HTML code at the beginning of a large block of quoted lines.
protected _beginLargeBlock ( array $lines, integer $qcount ) : string
$lines array Lines.
$qcount integer Number of lines in quoted level.
return string HTML code.

_endLargeBlock() protected method

Add HTML code at the end of a large block of quoted lines.
protected _endLargeBlock ( array $lines, integer $qcount ) : string
$lines array Lines.
$qcount integer Number of lines in quoted level.
return string HTML code.

_process() protected method

Process a batch of lines at the same quoted level.
protected _process ( array $lines, integer $qcount ) : string
$lines array Lines.
$qcount integer Number of lines in quoted level.
return string The rendered lines.

_removeBr() protected method

Remove leading and trailing BR tags.
protected _removeBr ( array $lines ) : array
$lines array An array of text.
return array The array with bare BR tags removed at the beginning and end.

getPatterns() public method

Returns a hash with replace patterns.
public getPatterns ( ) : array
return array Patterns hash.

postProcess() public method

Executes any code necessaray after applying the filter patterns.
public postProcess ( string $text ) : string
$text string The text after the filtering.
return string The modified text.

preProcess() public method

Executes any code necessaray before applying the filter patterns.
public preProcess ( string $text ) : string
$text string The text before the filtering.
return string The modified text.

Property Details

$_params protected_oe property

Filter parameters.
protected array $_params
return array

$_qlimit protected_oe property

The number of quoted lines to exceed to trigger large block processing.
protected int $_qlimit
return integer