• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/liveid.php
  • Класс: WLL_ConsentToken
  • Вызов: WLL_ConsentToken::setOffers
function setOffers($offers)
{
	if (!$offers) {
		//throw new Exception('Error: WLL_ConsentToken: Null offers.');
		$this->setError('Error: WLL_ConsentToken: Null offers.');
		return ;
	}

	$offers = urldecode($offers);

	//Split $offers by ";" and then take only substring before first ":"
	if(preg_match_all("/(^|;)([^:;]*)/", $offers, $arMatch))
	{
		$this->_offers = $arMatch[2];
		$this->_offers_string = ltrim(implode(",", $arMatch[2]), ",");
	}
	else
	{
		$this->_offers = array();
		$this->_offers_string = "";
	}
}