Accepts a key-value array of replacements, the key being the value to be replaced, the value being the replacement.

package Formagic\Filter
author Florian Sonnenburg
since 2009 First time introduced

 Methods

Constructor

__construct(array $replacements) 

Parameters

$replacements

array

Find-Replace-Array

Replaces strings according to the replacements array.

filter(mixed $value) : mixed

Uses the PHP function \strtr() for replacing.

inherited_from \Formagic_Filter_Interface::filter()

Parameters

$value

mixed

The value to be filtered

Returns

mixedThe filtered value

 Properties

 

Array containing the replacements

$_replacements : array

Default