Exemplo n.º 1
0
 public static function detect($message, &$info = null)
 {
     if (!self::$_detector) {
         self::$_detector = new Mzax_Bounce_Detector();
     }
     if (!$message instanceof Mzax_Bounce_Message) {
         $message = new Mzax_Bounce_Message($message);
     }
     $info = self::$_detector->inspect($message);
     return $message;
 }
Exemplo n.º 2
0
 /**
  * Retrieve bounce decoder
  * 
  * @return Mzax_Bounce_Detector
  */
 public static function getBounceDecoder()
 {
     static $bounceDecoder;
     if (!$bounceDecoder) {
         $bounceDecoder = new Mzax_Bounce_Detector();
         $bounceDecoder->addDetector(Mage::getModel('mzax_emarketing/inbox_bounce_detector_unsubscribe'), 0);
         $bounceDecoder->addDetector(Mage::getModel('mzax_emarketing/inbox_bounce_detector_recipient'), 1);
         $bounceDecoder->addDetector(Mage::getModel('mzax_emarketing/inbox_bounce_detector_store'), 2);
     }
     return $bounceDecoder;
 }