• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/connector/datacounter.php
  • Класс: BitrixSenderConnectorDataCounter
  • Вызов: DataCounter::__construct
public function __construct(array $data)
{
	$this->data = array();
	$types = RecipientType::getList();
	foreach ($data as $typeId => $count)
	{
		if (is_numeric($typeId))
		{
			$typeId = (int) $typeId;
		}
		$typeId = $typeId ?: RecipientType::EMAIL;
		$typeId = is_numeric($typeId) ? $typeId : RecipientType::getId($typeId);
		if ($typeId && !in_array($typeId, $types))
		{
			continue;
		}

		$this->data[$typeId] = (int) $count;
	}
}