1 | <?php |
||
22 | class StrReplaceTransformer implements TransformerInterface { |
||
23 | |||
24 | /** |
||
25 | * Replaces. |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | private $replaces; |
||
30 | |||
31 | /** |
||
32 | * Searches. |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | private $searches; |
||
37 | |||
38 | /** |
||
39 | * Constructor. |
||
40 | * |
||
41 | * @param array $searches The searches. |
||
42 | * @param array $replaces The replaces. |
||
43 | */ |
||
44 | public function __construct(array $searches, array $replaces) { |
||
48 | |||
49 | /** |
||
50 | * Get the replaces. |
||
51 | * |
||
52 | * @return array Returns the replaces. |
||
53 | */ |
||
54 | public function getReplaces(): array { |
||
57 | |||
58 | /** |
||
59 | * Get the searches. |
||
60 | * |
||
61 | * @return array Returns the searches. |
||
62 | */ |
||
63 | public function getSearches(): array { |
||
66 | |||
67 | /** |
||
68 | * Set the replaces. |
||
69 | * |
||
70 | * @param array $replaces The replaces. |
||
71 | * @return TransformerInterface Returns this str_replace transformer. |
||
72 | */ |
||
73 | public function setReplaces(array $replaces): TransformerInterface { |
||
77 | |||
78 | /** |
||
79 | * Set the searches. |
||
80 | * |
||
81 | * @param array $searches The searches. |
||
82 | * @return TransformerInterface Returns this str_replace transformer. |
||
83 | */ |
||
84 | public function setSearches(array $searches): TransformerInterface { |
||
88 | |||
89 | /** |
||
90 | * {@inheritDoc} |
||
91 | */ |
||
92 | public function transform($value) { |
||
98 | } |
||
99 |