category Zend
package Zend_Filter
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

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

__construct(string|array $options = null) : void

Parameters

$options

stringarray

Perform regexp replacement as filter

filter(string $value) : string
inherited_from \Zend_Filter_Interface::filter()

Parameters

$value

string

Returns

string

Get currently set match pattern

getMatchPattern() : string

Returns

string

Get currently set replacement value

getReplacement() : string

Returns

string

Is Unicode Support Enabled Utility function

isUnicodeSupportEnabled() : boolean
Static

Returns

boolean

Set the match pattern for the regex being called within filter()

setMatchPattern(mixed $match) : \Zend_Filter_PregReplace

Parameters

$match

mixed
  • same as the first argument of preg_replace

Returns

\Zend_Filter_PregReplace

Set the Replacement pattern/string for the preg_replace called in filter

setReplacement(mixed $replacement) : \Zend_Filter_PregReplace

Parameters

$replacement

mixed
  • same as the second argument of preg_replace

Returns

\Zend_Filter_PregReplace

Method to cache the regex needed to determine if unicode support is available

_determineUnicodeSupport() : boolean
Static

Returns

boolean

 Properties

 

Pattern to match

$_matchPattern : mixed

Default

null
 

Replacement pattern

$_replacement : mixed

Default

''
 

Is unicode enabled?

$_unicodeSupportEnabled : boolean

Default

null
Static