@param mixed $sent_flag

@return SubscriberList
515738
public function setSentFlag($sent_flag)
        {
            $this->sent_flag = ($sent_flag == 1 || $sent_flag == 'Y' || $sent_flag === TRUE) ? TRUE : FALSE;

            return $this;
        }
1014952
public function subscribers(Request $request)
    {
        $order  = $request->input('order');
        $search = $request->input('search',null);
        $search = ($search ? $search['value'] : null);

        return $this->subscriber->get_ajax(
            $request->input('draw'), $request->input('start'), $request->input('length'), $order[0]['column'], $order[0]['dir'], $search
        );
    }
523273
def _subscribed(self):
        
        self.logger.debug('Subscription confirmed.')
        self.state = 'subscribed'
        for message in self.message_queue:
            self.send(message)
89389
public function setSendMode($send_mode)
    {
        $modes = [
            'ajax',
            'submit'
        ];

        if (!in_array($send_mode, $modes)) {
            Throw new FormDesignerException(sprintf('"%s" is not an allowed form sendmode.', $send_mode), 1000);
        }

        $this->send_mode = $send_mode;

        return $this;
    }
493553
public function sendAcceptSubscriptionRequest($to)
    {
        $presence = new \sb\XMPP\Presence();
        $presence->setType('subscribed');
        $presence->setTo($to);
        return $this->sendPresence($presence);
    }
978915
public function run($sendValue=null){
            
            if($sendValue!==null) $this->sendValue = $sendValue;
            
            //Compatible the first item.
            
            if($this->beforeFirstYield){
                
                //Make the flag false.
                $this->beforeFirstYield = false;
                
                //Return the current return value.
                return $this->Generator->current();
                
            }else{
                
                /**
                 * Var $return
                 * The return value.
                 * 
                 */
                $return = $this->Generator->send($this->sendValue);
                
                //Clear the sendValue
                $this->sendValue = null;
                
                //Return the Return value
                return $return;
                
            }
            
        }
121923
def event_subscription(event)
      ActiveSupport::Notifications.subscribe(event[:id]) do |*, event_id, data|
        filtered_data = data.slice(*event[:allowed_data])
        filtered_data[:event_name] = event[:id]
        filtered_data[:event_id] = event_id
        if event[:id] == "sql.active_record"
          binds = data[:binds].each_with_object({}) { |bind, output| output[bind.name] = '?' if defined?(bind.name) }
          filtered_data[:binds] = JSON.dump(binds) unless binds.empty?
        end
        Bugsnag.leave_breadcrumb(
          event[:message],
          filtered_data,
          event[:type],
          :auto
        )
      end
    end
280541
function autoSubscribe() {
    //re-add pending subscribers
    if (_pendingSubscribers.length > 0) {
      async.each(_pendingSubscribers, function(sub, callback) {
        debug('Add pending subscriber', sub);
        self.subscribeToTopic(sub.exchange, sub.queue, sub.filter, sub.subscriber, sub.opts, function(err) {
          if (err) {
            debug('Failed to add subscriber, keep it', sub);
          } else {
            //done, remove the item from the pending subscribers
            var idx = _pendingSubscribers.indexOf(sub);
            _pendingSubscribers.splice(idx, 1);
            debug('pending subsriber added, now there are ' + _pendingSubscribers.length + ' left');
          }
          return callback();
        });
      }, function() {
        debug('pending subscribers are added');
      });
    }
  }
1219852
public function composeSubscriberSubmission($newSubscribers = [])
    {

        $composedSubscriberList = [];
        foreach ($newSubscribers as $newSubscriberCount => $newSubscriber) {
            if (isset($newSubscriber['birthdate']) && is_int($newSubscriber['birthdate'])) {
                $newSubscriber['birthdate_timestamp'] = $newSubscriber['birthdate'];
            }
            if (isset($newSubscriber['mobile']) && strlen($newSubscriber['mobile']) < 8) {
                unset($newSubscriber['mobile']);
            }

            // support different merge_vars for US vs UK
            if (isset($newSubscriber['application_id']) && $newSubscriber['application_id'] == 'UK') {
                $mergeVars = [
                    'FNAME' => isset($newSubscriber['fname']) ? $newSubscriber['fname'] : '',
                    'LNAME' => isset($newSubscriber['lname']) ? $newSubscriber['lname'] : '',
                    'MERGE3' => isset($newSubscriber['birthdate_timestamp']) ? date('d/m/Y',
                        $newSubscriber['birthdate_timestamp']) : '',
                ];
            } // Don't add Canadian users to MailChimp
            elseif (isset($newSubscriber['application_id']) && $newSubscriber['application_id'] == 'CA') {
                $this->channel->basic_ack($newSubscriber['mb_delivery_tag']);
                break;
            } else {
                $mergeVars = [
                    'UID' => isset($newSubscriber['uid']) ? $newSubscriber['uid'] : '',
                    'FNAME' => isset($newSubscriber['fname']) ? $newSubscriber['fname'] : '',
                    'MERGE3' => (isset($newSubscriber['fname']) && isset($newSubscriber['lname'])) ?
                        $newSubscriber['fname'] . $newSubscriber['lname'] : '',
                    'BDAY' => isset($newSubscriber['birthdate_timestamp']) ?
                        date('m/d', $newSubscriber['birthdate_timestamp']) : '',
                    'BDAYFULL' => isset($newSubscriber['birthdate_timestamp']) ?
                        date('m/d/Y', $newSubscriber['birthdate_timestamp']) : '',
                    'MOBILE' => isset($newSubscriber['mobile']) ? $newSubscriber['mobile'] : '',
                ];
            }

            // Assign source interest group. Only support on main DoSomething Members List
            // @todo: Support "id" as a variable. Perhaps a config setting keyed on countries / global.
            if (isset($newSubscriber['source']) &&
                isset($newSubscriber['user_country']) &&
                strtoupper($newSubscriber['user_country']) == 'US')
            {
                $mergeVars['groupings'] = [
                    0 => [
                      'id' => 10657,  // DoSomething Memebers -> Import Source
                      'groups' => [
                          $newSubscriber['source']
                      ]
                    ],
                ];
            }

            $composedSubscriberList[$newSubscriberCount] = [
                'email' => [
                  'email' => $newSubscriber['email']
                ],
                'merge_vars' => $mergeVars
            ];
        }

        return $composedSubscriberList;
    }
377103
public function sendSubscription(array $data = [])
    {
        $params = $this->formatMessage($data);

        $this->restoreMessage();

        return $this->httpPostJson('cgi-bin/message/template/subscribe', $params);
    }
990002
public function subscribe($destination, $selector = null, $ack = 'auto', array $header = [])
    {
        return $this->state->subscribe($destination, $selector, $ack, $header);
    }
616348
public function getSubscraction($is_subscribed, $topic_id)
    {
        if (!User::get()->is_guest && ForumSettings::get('o_topic_subscriptions') == '1') {
            if ($is_subscribed) {
                // I apologize for the variable naming here. It's a mix of subscription and action I guess :-)
                $subscraction = "\t\t".'<span>'.__('Is subscribed').
                    ' - </span><a class="btn btn-primary btn-sm" href="'.
                    Router::pathFor('unsubscribeTopic', ['id' => $topic_id]).'">'. __('Unsubscribe').'</a>'."\n";
            } else {
                $subscraction = "\t\t".'<a class="btn btn-primary btn-sm" href="'.
                    Router::pathFor('subscribeTopic', ['id' => $topic_id]).'">'.__('Subscribe').'</a>'."\n";
            }
        } else {
            $subscraction = '';
        }

        $subscraction = Container::get('hooks')
            ->fire('model.topic.get_subscraction', $subscraction, $is_subscribed, $topic_id);

        return $subscraction;
    }
1071045
public function sendNotificationInMany( $subscriber, $contentObject, $comment, $tpl = null )
    {
         if ( is_null( $tpl ) )
         {
             $tpl = eZTemplate::factory();
         }
         $tpl->setVariable( 'subscriber', $subscriber );
         $tpl->setVariable( 'contentobject', $contentObject );
         $tpl->setVariable( 'comment', $comment );
         $subject = $tpl->fetch( $this->subjectTemplatePath );

         $body = $tpl->fetch( $this->bodyTemplatePath );
         $this->executeSending( $subject, $body, $subscriber );
    }
846395
protected function processTopicSubscription($topic_id, $recipients_tokens, $url)
    {
        if (!is_array($recipients_tokens))
            $recipients_tokens = [$recipients_tokens];

        return $this->guzzleClient->post(
            $url,
            [
                'headers' => [
                    'Authorization' => sprintf('key=%s', $this->apiKey),
                    'Content-Type' => 'application/json'
                ],
                'body' => json_encode([
                    'to' => '/topics/' . $topic_id,
                    'registration_tokens' => $recipients_tokens,
                ])
            ]
        );
    }
295586
static function subscribed($to)
    {
        $xml = self::maker($to, false, false, false, 'subscribed');
        \Moxl\API::request($xml);
    }
1098426
public function getSubscribeFrame(
        $destination,
        $subscriptionId = null,
        $ack = 'auto',
        $selector = null,
        $durable = false
    ) {
        $frame = parent::getSubscribeFrame($destination, $subscriptionId, $ack, $selector);
        if ($this->hasClientId() && $durable) {
            $frame['persistent'] = 'true';
        }
        return $frame;
    }
445496
public function addSubscriber($email, $is_confirmed = true, $fields = [])
	{
		$subscriber = [
			'emailaddress' => $email,
			'fields' => $fields,
		];

		if (!$is_confirmed) {
			$subscriber = array_merge($subscriber, [
				'confirmed' => false,
				'confirmdate' => null,
				'confirmip' => null,
			]);
		}

		$result = $this->iconneqt->postListSubscriber($this->id, $subscriber);

		return $this->iconneqt->getListSubscriber($this->id, $result->subscriberid);
	}