1 | <?php |
||
18 | class Replace extends FilterRule |
||
19 | { |
||
20 | /** |
||
21 | * @var mixed |
||
22 | */ |
||
23 | protected $search; |
||
24 | |||
25 | /** |
||
26 | * @var mixed |
||
27 | */ |
||
28 | protected $replace; |
||
29 | |||
30 | /** |
||
31 | * Set required params for replacement |
||
32 | * |
||
33 | * @param $search |
||
34 | * @param $replace |
||
35 | */ |
||
36 | 5 | public function __construct($search, $replace) |
|
41 | |||
42 | /** |
||
43 | * Replace matched for a replacement in the value |
||
44 | * |
||
45 | * @param mixed $value |
||
46 | * @return string |
||
47 | */ |
||
48 | 5 | public function filter($value) |
|
52 | } |
||
53 |