\Horde_Core_Factory_TextFilter

A Horde_Injector:: based Horde_Text_Filter_Base:: factory.

Copyright 2010-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.

Summary

Methods
Properties
Constants
__construct()
create()
filter()
No public properties found
No constants found
_getDriverName()
_getDriver()
$_injector
N/A
No private methods found
No private properties found
N/A

Properties

$_injector

$_injector : \Horde_Injector

The injector.

Type

\Horde_Injector

Methods

__construct()

__construct(\Horde_Injector  $injector) 

Constructor.

Parameters

\Horde_Injector $injector

The injector to use.

create()

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

Return the Horde_Text_Filter_Base:: instance.

Parameters

string $driver

Either a driver name, or the full class name to use.

array $params

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

Throws

\Horde_Text_Filter_Exception

Returns

\Horde_Text_Filter_Base —

The singleton 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.

Returns

string —

The transformed text.

_getDriverName()

_getDriverName(string  $driver, string  $base) : string

Return the classname of the driver to load.

Parameters

string $driver

Driver name.

string $base

The base classname.

Throws

\Horde_Exception

Returns

string —

Classname.

_getDriver()

_getDriver(string  $driver, array  $params) : array

Gets the driver/params for a given base Horde_Text_Filter driver.

Parameters

string $driver

Either a driver name, or the full class name to use.

array $params

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

Returns

array —

Driver as the first value, params list as the second.