• Модуль: forum
  • Путь к файлу: ~/bitrix/modules/forum/lib/update/livefeedconvertservicemessage.php
  • Класс: BitrixForumUpdateLivefeedConvertServiceMessage
  • Вызов: LivefeedConvertServiceMessage::decodeSocnetText
static function decodeSocnetText($text = '', $type = 'serialized')
{
	$result = [];
	if ($type === 'serialized')
	{
		$result = @unserialize($text, ["allowed_classes" => false]);
	}
	elseif ($type === 'bar')
	{
		$paramsList = explode('|', $text);
		if (!empty($paramsList))
		{
			foreach($paramsList as $pair)
			{
				list($key, $value) = explode('=', $pair);
				if (isset($key) && isset($value))
				{
					$result[$key] = $value;
				}
			}
		}
	}

	return $result;
}