TYPO3  7.6
HitReporter.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 {
23  private $_failures = array();
24 
25  private $_failures_cache = array();
26 
34  public function notify(Swift_Mime_Message $message, $address, $result)
35  {
36  if (self::RESULT_FAIL == $result && !isset($this->_failures_cache[$address])) {
37  $this->_failures[] = $address;
38  $this->_failures_cache[$address] = true;
39  }
40  }
41 
47  public function getFailedRecipients()
48  {
49  return $this->_failures;
50  }
51 
55  public function clear()
56  {
57  $this->_failures = $this->_failures_cache = array();
58  }
59 }