1: <?php
2:
3: 4: 5: 6: 7: 8: 9:
10:
11: 12: 13: 14: 15:
16: class Swift_StreamFilters_StringReplacementFilterFactory implements Swift_ReplacementFilterFactory
17: {
18:
19: private $_filters = array();
20:
21: 22: 23: 24: 25: 26:
27: public function createFilter($search, $replace)
28: {
29: if (!isset($this->_filters[$search][$replace])) {
30: if (!isset($this->_filters[$search])) {
31: $this->_filters[$search] = array();
32: }
33:
34: if (!isset($this->_filters[$search][$replace])) {
35: $this->_filters[$search][$replace] = array();
36: }
37:
38: $this->_filters[$search][$replace]
39: = new Swift_StreamFilters_StringReplacementFilter($search, $replace);
40: }
41:
42: return $this->_filters[$search][$replace];
43: }
44: }
45: