category Zend
package Zend_Filter

 Methods

Constructor

__construct(string $searchSeparator, string $replacementSeparator) 

Parameters

$searchSeparator

string

Separator to search for

$replacementSeparator

string

Separator to replace with

Invoke filter as a command

__invoke(mixed $value) : mixed
Inherited

Proxies to filter()

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

Parameters

$value

mixed

Exceptions

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

Returns

mixed

Defined by Zend\Filter\Filter

filter(string $value) : string

Returns the string $value, replacing the searched separators with the defined ones

Parameters

$value

string

Exceptions

\Zend\Filter\Exception\RuntimeException

Returns

string

Retrieve options representing object state

getOptions() : array
Inherited

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

Returns

array

Get currently set match pattern

getPattern() : string | array
Inherited

inherited_from \Zend\Filter\PregReplace::getPattern()

Returns

stringarray

Get currently set replacement value

getReplacement() : string | array
Inherited

inherited_from \Zend\Filter\PregReplace::getReplacement()

Returns

stringarray

Returns the actual set separator which replaces the searched one

getReplacementSeparator() : string

Returns

string

Returns the actual set separator to search for

getSearchSeparator() : string

Returns

string

hasPcreUnicodeSupport()

hasPcreUnicodeSupport() : bool
Inherited

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

Returns

bool

setOptions()

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

inherited_from \Zend\Filter\AbstractFilter::setOptions()
inherited_from \Zend\Filter\PregReplace::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
Inherited

see \Zend\Filter\preg_replace()
inherited_from \Zend\Filter\PregReplace::setPattern()

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
Inherited

see \Zend\Filter\preg_replace()
inherited_from \Zend\Filter\PregReplace::setReplacement()

Parameters

$replacement

arraystring
  • same as the second argument of preg_replace

Exceptions

\Zend\Filter\Exception\InvalidArgumentException

Returns

Sets a new separator which replaces the searched one

setReplacementSeparator(string $separator) : \Zend\Filter\Word\SeparatorToSeparator

Parameters

$separator

string

Separator which replaces the searched one

Returns

Sets a new seperator to search for

setSearchSeparator(string $separator) : \Zend\Filter\Word\SeparatorToSeparator

Parameters

$separator

string

Seperator to search for

Returns

Do the real work, replaces the seperator to search for with the replacement seperator

_separatorToSeparatorFilter(string $value) : string

Returns the replaced string

Parameters

$value

string

Exceptions

\Zend\Filter\Exception\RuntimeException

Returns

string

isOptions()

isOptions(mixed $options) : bool
Inherited

inherited_from \Zend\Filter\AbstractFilter::isOptions()
inherited_from \Zend\Filter\PregReplace::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
inherited_from \Zend\Filter\PregReplace::$$hasPcreUnicodeSupport
 

Filter options

$options : array
Inherited

inherited_from \Zend\Filter\PregReplace::$$options
 

$replacementSeparator

$replacementSeparator 

 

$searchSeparator

$searchSeparator