\Horde_Text_Filter

Horde_Text_Filter is a parent class for defining stackable text filters.

Summary

Methods
Properties
Constants
factory()
filter()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

factory()

factory(string  $driver, array  $params = array()) : \Horde_Text_Filter_Base

Attempts to return a concrete instance based on $driver.

Parameters

string $driver

Either a driver name, or the full class name to use (class must extend Horde_Text_Filter_Base).

array $params

A hash containing any additional configuration parameters a subclass might need.

Throws

\Horde_Text_Filter_Exception

Returns

\Horde_Text_Filter_Base

The newly created concrete instance.

filter()

filter(string  $text, mixed  $filters = array(), mixed  $params = array()) : string

Applies a set of patterns to a block of text.

Parameters

string $text

The text to filter.

mixed $filters

The list of filters (or a single filter).

mixed $params

The list of params to use with each filter.

Throws

\Horde_Text_Filter_Exception

Returns

string —

The transformed text.