Horde_Text_Filter
in package
Horde_Text_Filter is a parent class for defining stackable text filters.
Tags
Table of Contents
- factory() : Horde_Text_Filter_Base
- Attempts to return a concrete instance based on $driver.
- filter() : string
- Applies a set of patterns to a block of text.
Methods
factory()
Attempts to return a concrete instance based on $driver.
public
static factory(string $driver[, array<string|int, mixed> $params = array() ]) : Horde_Text_Filter_Base
Parameters
- $driver : string
-
Either a driver name, or the full class name to use (class must extend Horde_Text_Filter_Base).
- $params : array<string|int, mixed> = array()
-
A hash containing any additional configuration parameters a subclass might need.
Tags
Return values
Horde_Text_Filter_Base —The newly created concrete instance.
filter()
Applies a set of patterns to a block of text.
public
static filter(string $text[, mixed $filters = array() ][, mixed $params = array() ]) : string
Parameters
- $text : string
-
The text to filter.
- $filters : mixed = array()
-
The list of filters (or a single filter).
- $params : mixed = array()
-
The list of params to use with each filter.
Tags
Return values
string —The transformed text.