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; }
/** * 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; }