protected function subscribe() { $rmb = new Custom_Newsletter_Resubscription_Message_Builder(); $nsm = new Newsletter_Subscription_Manager(); $nsm->setResubscriptionMessageBuilder($rmb); $email = $this->getFirstElementValueNonDefault('email'); $this->_subscription_result = $nsm->subscribe(NULL, $email); $this->_status = $this->_subscription_result === Newsletter_Subscription_Manager::SUBSCRIBED ? self::SUCCESS : self::FAILURE; }
protected function _handleInput() { $this->_code = isset($_GET['code']) ? $_GET['code'] : NULL; $nsm = new Newsletter_Subscription_Manager(); $this->_resubscription_result = $nsm->resubscribe(NULL, NULL, $this->_code); }