package Default
inherited_from \Zend\Filter\AbstractFilter

 Methods

Clone filters

__clone() 

Initialize filter chain

__construct(null|array|\Traversable $options = null

Parameters

$options

nullarray\Traversable

Invoke filter as a command

__invoke(mixed $value) : mixed
Inherited

Proxies to \filter()

Parameters

$value

mixed

Exceptions

\Zend\Filter\Exception\ExceptionInterface If filtering $value is impossible

Returns

mixed

Prepare filter chain for serialization

__sleep() 

Plugin manager (property 'plugins') cannot be serialized. On wakeup the property remains unset and next invocation to getPluginManager() sets the default plugin manager instance (FilterPluginManager).

Attach a filter to the chain

attach(callable|\Zend\Filter\FilterInterface $callback, integer $priority = self::DEFAULT_PRIORITY) : \Zend\Filter\FilterChain
fluent This method is part of a fluent interface and will return the same instance

Parameters

$callback

callable\Zend\Filter\FilterInterface

A Filter implementation or valid PHP callback

$priority

integer

Priority at which to enqueue filter; defaults to 1000 (higher executes earlier)

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\FilterChain

Attach a filter to the chain using a short name

attachByName(string $name, mixed $options = array(), integer $priority = self::DEFAULT_PRIORITY) : \Zend\Filter\FilterChain

Retrieves the filter from the attached plugin manager, and then calls attach() with the retrieved instance.

fluent This method is part of a fluent interface and will return the same instance

Parameters

$name

string

$options

mixed

$priority

integer

Priority at which to enqueue filter; defaults to 1000 (higher executes earlier)

Returns

\Zend\Filter\FilterChain

Return the count of attached filters

count() : integer

Returns

integer

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)

Parameters

$value

mixed

Returns

mixed

Get all the filters

getFilters() : \Zend\Stdlib\PriorityQueue

Returns

\Zend\Stdlib\PriorityQueue

Retrieve options representing object state

getOptions() : array
Inherited

Returns

array

Get plugin manager instance

getPluginManager() : \Zend\Filter\FilterPluginManager

Returns

\Zend\Filter\FilterPluginManager

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : boolean
InheritedStatic
deprecated Since 2.1.0

Returns

boolean

Merge the filter chain with the one given in parameter

merge(\Zend\Filter\FilterChain $filterChain) : \Zend\Filter\FilterChain
fluent This method is part of a fluent interface and will return the same instance

Parameters

$filterChain

\Zend\Filter\FilterChain

Returns

\Zend\Filter\FilterChain

Retrieve a filter plugin by name

plugin(mixed $name, array $options = array()) : \Zend\Filter\FilterInterface

Parameters

$name

mixed

$options

array

Returns

\Zend\Filter\FilterInterface

setOptions()

setOptions(array|\Traversable $options) : \Zend\Filter\FilterChain
inherited_from \Zend\Filter\AbstractFilter::setOptions()
fluent This method is part of a fluent interface and will return the same instance

Parameters

$options

array\Traversable

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\FilterChain

setOptions()

setOptions(array|\Traversable $options) : \Zend\Filter\FilterChain
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$options

array\Traversable

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\FilterChain

Set plugin manager instance

setPluginManager(\Zend\Filter\FilterPluginManager $plugins) : \Zend\Filter\FilterChain
fluent This method is part of a fluent interface and will return the same instance

Parameters

$plugins

\Zend\Filter\FilterPluginManager

Returns

\Zend\Filter\FilterChain

isOptions()

isOptions(mixed $options) : boolean
InheritedStatic

Parameters

$options

mixed

Returns

boolean

 Properties

 

Filter chain

$filters : \Zend\Stdlib\PriorityQueue

Default

 

Filter options

$options : array

Default

array()
 

$plugins

$plugins : \Zend\Filter\FilterPluginManager

Default

 Constants

 

Default priority at which filters are added

DEFAULT_PRIORITY = 1000