Class PregReplace

Summary

Fully Qualified Name: Zend\Filter\PregReplace
Extends: AbstractFilter

Description

Methods

Name Description Defined By
__construct() Constructor Supported options are 'pattern' => matching pattern 'replacement' => replace with this PregReplace
__invoke() Invoke filter as a command AbstractFilter
filter() Perform regexp replacement as filter PregReplace
getOptions() Retrieve options representing object state AbstractFilter
getPattern() Get currently set match pattern PregReplace
getReplacement() Get currently set replacement value PregReplace
hasPcreUnicodeSupport() AbstractFilter
setOptions() AbstractFilter
setPattern() Set the regex pattern to search for PregReplace
setReplacement() Set the replacement array/string PregReplace

Method Details

__construct()

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

Parameter Name Type Description
$options array|\Traversable|string|null

Returns:

__invoke()

Invoke filter as a command

Proxies to {@link filter()}

Parameter Name Type Description
$value mixed

Returns: mixed

filter()

Perform regexp replacement as filter

Parameter Name Type Description
$value mixed

Returns: mixed

getOptions()

Retrieve options representing object state

Returns: array

getPattern()

Get currently set match pattern

Returns: string|array

getReplacement()

Get currently set replacement value

Returns: string|array

hasPcreUnicodeSupport()

Returns: bool

setOptions()

Parameter Name Type Description
$options array|\Traversable

Returns: self

setPattern()

Set the regex pattern to search for

Parameter Name Type Description
$pattern string|array -

Returns: self

setReplacement()

Set the replacement array/string

Parameter Name Type Description
$replacement array|string -

Returns: self

Top