Methods

Clone filters

__clone() 

Initialize filter chain

__construct(null | array | \Zend\Filter\Traversable $options) 

Parameters

$options

nullarray\Zend\Filter\Traversable

Invoke filter as a command

__invoke(mixed $value) : mixed
Inherited

Proxies to filter()

inherited_from \Zend\Filter\AbstractFilter::__invoke()

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 invokation to getPluginManager() sets the default plugin manager instance (FilterPluginManager).

Attach a filter to the chain

attach(\Zend\Filter\callable | \Zend\Filter\FilterInterface $callback, int $priority) : \Zend\Filter\self

Parameters

$callback

\Zend\Filter\callable\Zend\Filter\FilterInterface

A Filter implementation or valid PHP callback

$priority

int

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

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\self

Attach a filter to the chain using a short name

attachByName(string $name, mixed $options, int $priority) : \Zend\Filter\self

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

Parameters

$name

string

$options

mixed

$priority

int

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

Returns

\Zend\Filter\self

Return the count of attached filters

count() : int

Returns

int

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

Exceptions

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

Returns

mixed

Get all the filters

getFilters() : \Zend\Stdlib\PriorityQueue

Retrieve options representing object state

getOptions() : array
Inherited

inherited_from \Zend\Filter\AbstractFilter::getOptions()

Returns

array

Get plugin manager instance

getPluginManager() : \Zend\Filter\FilterPluginManager

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : bool
Inherited

inherited_from \Zend\Filter\AbstractFilter::hasPcreUnicodeSupport()

Returns

bool

Merge the filter chain with the one given in parameter

merge(\Zend\Filter\FilterChain $filterChain) : \Zend\Filter\self

Parameters

Returns

\Zend\Filter\self

Retrieve a filter plugin by name

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

Parameters

$name

mixed

$options

array

Returns

setOptions()

setOptions(array | \Zend\Filter\Traversable $options) : \Zend\Filter\self

Parameters

$options

array\Zend\Filter\Traversable

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

\Zend\Filter\self

Set plugin manager instance

setPluginManager(\Zend\Filter\FilterPluginManager $plugins) : \Zend\Filter\self

Parameters

Returns

\Zend\Filter\self

isOptions()

isOptions(mixed $options) : bool
Inherited

inherited_from \Zend\Filter\AbstractFilter::isOptions()

Parameters

$options

mixed

Returns

bool

 Properties

 

Filter chain

$filters : \Zend\Stdlib\PriorityQueue

 

Filter options

$options : array
Inherited

inherited_from \Zend\Filter\AbstractFilter::$$options
 

$plugins

$plugins : \Zend\Filter\FilterPluginManager

 Constants

 

Default priority at which filters are added

DEFAULT_PRIORITY