TransportWebHook::send

  1. Bitrix24 API (v. 23.675.0)
  2. sender
  3. TransportWebHook
  4. send
  • Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/sender/webhook/transportwebhook.php
  • Класс: Bitrix\Sender\Integration\Sender\WebHook\TransportWebHook
  • Вызов: TransportWebHook::send
public function send(Message\Adapter $message)
{
	$this->buffer['uri'] = $message->getConfiguration()->get('URI');
	$this->buffer['list'][$message->getRecipientType()][] = $message->getTo();

	$count = 0;
	$types = $this->getSupportedRecipientTypes();
	foreach ($types as $type)
	{
		if (!isset($this->buffer['list'][$type]))
		{
			continue;
		}

		$count += count($this->buffer['list'][$type]);
	}

	if ($count >= self::MAX_BUFFER_SIZE)
	{
		$this->flushBuffer();
	}

	return true;
}

Добавить комментарий