\Horde_Text_Filter_Words

Filters the given text based on the words found in a word list.

Parameters:

  • replacement: (string) The replacement string. Defaults to "*****".
  • words: (array) List of words to replace. (Since 2.1.0)
  • words_file: (string) Filename containing the words to replace.

Summary

Methods
Properties
Constants
__construct()
preProcess()
getPatterns()
postProcess()
No public properties found
No constants found
_getReplacement()
$_params
N/A
No private methods found
No private properties found
N/A

Properties

$_params

$_params : array

Filter parameters.

Type

array

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.

_getReplacement()

_getReplacement(  $line) : array

Returns a hash with replace patterns.

Parameters

$line

Returns

array —

Patterns hash.