TYPO3  7.6
StringReplacementFilterFactory.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of SwiftMailer.
5  * (c) 2004-2009 Chris Corbyn
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10 
17 {
19  private $_filters = array();
20 
29  public function createFilter($search, $replace)
30  {
31  if (!isset($this->_filters[$search][$replace])) {
32  if (!isset($this->_filters[$search])) {
33  $this->_filters[$search] = array();
34  }
35 
36  if (!isset($this->_filters[$search][$replace])) {
37  $this->_filters[$search][$replace] = array();
38  }
39 
40  $this->_filters[$search][$replace] = new Swift_StreamFilters_StringReplacementFilter($search, $replace);
41  }
42 
43  return $this->_filters[$search][$replace];
44  }
45 }