Mage_Newsletter_Model_Problem Class Reference

Inheritance diagram for Mage_Newsletter_Model_Problem:

Mage_Core_Model_Abstract Varien_Object

List of all members.

Public Member Functions

 addSubscriberData (Mage_Newsletter_Model_Subscriber $subscriber)
 addQueueData (Mage_Newsletter_Model_Queue $queue)
 addErrorData (Exception $e)
 getSubscriber ()
 unsubscribe ()

Protected Member Functions

 _construct ()

Protected Attributes

 $_subscriber = null


Detailed Description

Definition at line 35 of file Problem.php.


Member Function Documentation

_construct (  )  [protected]

Enter description here...

Reimplemented from Varien_Object.

Definition at line 40 of file Problem.php.

00041     {
00042         $this->_init('newsletter/problem');
00043     }

addErrorData ( Exception $  e  ) 

Definition at line 55 of file Problem.php.

00056     {
00057         $this->setProblemErrorCode($e->getCode());
00058         $this->setProblemErrorText($e->getMessage());
00059     }

addQueueData ( Mage_Newsletter_Model_Queue queue  ) 

Definition at line 50 of file Problem.php.

00051     {
00052         $this->setQueueId($queue->getId());
00053     }

addSubscriberData ( Mage_Newsletter_Model_Subscriber subscriber  ) 

Definition at line 45 of file Problem.php.

00046     {
00047         $this->setSubscriberId($subscriber->getId());
00048     }

getSubscriber (  ) 

Definition at line 61 of file Problem.php.

00062     {
00063         if(!$this->getSubscriberId()) {
00064             return null;
00065         }
00066 
00067 
00068         if(is_null($this->_subscriber)) {
00069             $this->_subscriber = Mage::getModel('newsletter/subscriber')
00070                 ->load($this->getSubscriberId());
00071         }
00072 
00073         return $this->_subscriber;
00074     }

unsubscribe (  ) 

Definition at line 76 of file Problem.php.

00077     {
00078         if($this->getSubscriber()) {
00079             $this->getSubscriber()->setSubscriberStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED)
00080                 ->setIsStatusChanged(true)
00081                 ->save();
00082         }
00083     }


Member Data Documentation

$_subscriber = null [protected]

Definition at line 38 of file Problem.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:29 2009 for Magento by  doxygen 1.5.8