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
Returns
mixed
Perform regexp replacement as filter
filter(mixed $value) : mixed
Parameters
$value
mixed
Exceptions
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
Get currently set replacement value
getReplacement() : string | array
hasPcreUnicodeSupport()
hasPcreUnicodeSupport() : bool
Inherited
inherited_from |
\Zend\Filter\AbstractFilter::hasPcreUnicodeSupport() |
Returns
bool
setOptions()
setOptions(array | \Traversable $options) : \Zend\Filter\self
Inherited
inherited_from |
\Zend\Filter\AbstractFilter::setOptions() |
Parameters
$options
array\Traversable
Exceptions
Returns
\Zend\Filter\self
Set the regex pattern to search for
setPattern(string | array $pattern) : \Zend\Filter\self
see |
\Zend\Filter\preg_replace() |
Parameters
$pattern
stringarray
- same as the first argument of preg_replace
Exceptions
Returns
\Zend\Filter\self
Set the replacement array/string
setReplacement(array | string $replacement) : \Zend\Filter\self
see |
\Zend\Filter\preg_replace() |
Parameters
$replacement
arraystring
- same as the second argument of preg_replace
Exceptions
Returns
\Zend\Filter\self
isOptions()
isOptions(mixed $options) : bool
Inherited
inherited_from |
\Zend\Filter\AbstractFilter::isOptions() |
Parameters
$options
mixed
Returns
bool
Validate a pattern and ensure it does not contain the "e" modifier
validatePattern(string $pattern) : bool
Parameters
$pattern
string
Exceptions
Returns
bool
Properties
Filter options
$options : array