category Zend
package Zend_Filter

 Methods

Constructor Supported options are 'pattern' => matching pattern 'replacement' => replace with this

__construct(array | \Traversable | string | null $options) 

Parameters

$options

array\Traversablestringnull

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

Perform regexp replacement as filter

filter(mixed $value) : mixed

Parameters

$value

mixed

Exceptions

\Zend\Filter\Exception\RuntimeException

Returns

mixed

Retrieve options representing object state

getOptions() : array
Inherited

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

Returns

array

Get currently set match pattern

getPattern() : string | array

Returns

stringarray

Get currently set replacement value

getReplacement() : string | array

Returns

stringarray

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : bool
Inherited

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

Returns

bool

setOptions()

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

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

Parameters

$options

array\Traversable

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

Set the regex pattern to search for

setPattern(string | array $pattern) : \Zend\Filter\PregReplace

see \Zend\Filter\preg_replace()

Parameters

$pattern

stringarray
  • same as the first argument of preg_replace

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

Set the replacement array/string

setReplacement(array | string $replacement) : \Zend\Filter\PregReplace

see \Zend\Filter\preg_replace()

Parameters

$replacement

arraystring
  • same as the second argument of preg_replace

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

isOptions()

isOptions(mixed $options) : bool
Inherited

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

Parameters

$options

mixed

Returns

bool

 Properties

 

Is PCRE is compiled with UTF-8 and Unicode support

$hasPcreUnicodeSupport : bool
Inherited

inherited_from \Zend\Filter\AbstractFilter::$$hasPcreUnicodeSupport
 

Filter options

$options : array