category Zend
package Zend_Filter
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Adds a new default namespace

addDefaultNamespaces(array|string $namespace) : null
Static

Parameters

$namespace

arraystring

Returns

null

Adds a filter to the chain

addFilter(\Zend_Filter_Interface $filter, string $placement = self::CHAIN_APPEND) : \Zend_Filter

Parameters

$filter

\Zend_Filter_Interface

$placement

string

Returns

\Zend_FilterProvides a fluent interface

Add a filter to the end of the chain

appendFilter(\Zend_Filter_Interface $filter) : \Zend_Filter

Parameters

$filter

\Zend_Filter_Interface

Returns

\Zend_FilterProvides a fluent interface

Returns $value filtered through each filter in the chain

filter(mixed $value) : mixed

Filters are run in the order in which they were added to the chain (FIFO)

inherited_from \Zend_Filter_Interface::filter()

Parameters

$value

mixed

Returns

mixed

Returns a value filtered through a specified filter class, without requiring separate instantiation of the filter object.

filterStatic(mixed $value, string $classBaseName, array $args = array(), array|string $namespaces = array()) : mixed
Static

The first argument of this method is a data input value, that you would have filtered. The second argument is a string, which corresponds to the basename of the filter class, relative to the Zend_Filter namespace. This method automatically loads the class, creates an instance, and applies the filter() method to the data input. You can also pass an array of constructor arguments, if they are needed for the filter class.

Parameters

$value

mixed

$classBaseName

string

$args

array

OPTIONAL

$namespaces

arraystring

OPTIONAL

Exceptions

\Zend_Filter_Exception

Returns

mixed

get()

get(mixed $value, string $classBaseName, array $args = array(), array|string $namespaces = array()) : mixed
Static
deprecated
see

Parameters

$value

mixed

$classBaseName

string

$args

array

OPTIONAL

$namespaces

arraystring

OPTIONAL

Exceptions

\Zend_Filter_Exception

Returns

mixed

Returns the set default namespaces

getDefaultNamespaces() : array
Static

Returns

array

Get all the filters

getFilters() : array

Returns

array

Returns true when defaultNamespaces are set

hasDefaultNamespaces() : boolean
Static

Returns

boolean

Add a filter to the start of the chain

prependFilter(\Zend_Filter_Interface $filter) : \Zend_Filter

Parameters

$filter

\Zend_Filter_Interface

Returns

\Zend_FilterProvides a fluent interface

Sets new default namespaces

setDefaultNamespaces(array|string $namespace) : null
Static

Parameters

$namespace

arraystring

Returns

null

 Properties

 

Default Namespaces

$_defaultNamespaces : array

Default

array()
Static
 

Filter chain

$_filters : array

Default

array()

 Constants

 

CHAIN_APPEND

CHAIN_APPEND = 'append' 
 

CHAIN_PREPEND

CHAIN_PREPEND = 'prepend'