[ Index ] |
MailPress 7.2 |
[ Index ] [ Classes ] [ Functions ] [ Variables ] [ Constants ] [ Statistics ] |
[Summary view] [Print] [Text view]
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 /** 12 * Creates filters for replacing needles in a string buffer. 13 * 14 * @author Chris Corbyn 15 */ 16 class Swift_StreamFilters_StringReplacementFilterFactory implements Swift_ReplacementFilterFactory 17 { 18 /** Lazy-loaded filters */ 19 private $filters = []; 20 21 /** 22 * Create a new StreamFilter to replace $search with $replace in a string. 23 * 24 * @param string $search 25 * @param string $replace 26 * 27 * @return Swift_StreamFilter 28 */ 29 public function createFilter($search, $replace) 30 { 31 if (!isset($this->filters[$search][$replace])) { 32 if (!isset($this->filters[$search])) { 33 $this->filters[$search] = []; 34 } 35 36 if (!isset($this->filters[$search][$replace])) { 37 $this->filters[$search][$replace] = []; 38 } 39 40 $this->filters[$search][$replace] = new Swift_StreamFilters_StringReplacementFilter($search, $replace); 41 } 42 43 return $this->filters[$search][$replace]; 44 } 45 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue May 19 15:55:14 2020 | Cross-referenced by PHPXref 0.7.1 |