XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
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 
11 //@require 'Swift/StreamFilters/StringReplacementFilter.php';
12 //@require 'Swift/StreamFilterFactory.php';
13 
21 {
22 
24  private $_filters = array();
25 
32  public function createFilter($search, $replace)
33  {
34  if (!isset($this->_filters[$search][$replace]))
35  {
36  if (!isset($this->_filters[$search]))
37  {
38  $this->_filters[$search] = array();
39  }
40 
41  if (!isset($this->_filters[$search][$replace]))
42  {
43  $this->_filters[$search][$replace] = array();
44  }
45 
46  $this->_filters[$search][$replace]
47  = new Swift_StreamFilters_StringReplacementFilter($search, $replace);
48  }
49 
50  return $this->_filters[$search][$replace];
51  }
52 
53 }