CBPRuntime::unserializeWorkflowStream

  1. Bitrix24 API (v. 23.675.0)
  2. bizproc
  3. CBPRuntime
  4. unserializeWorkflowStream
  • Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/runtime.php
  • Класс: CBPRuntime
  • Вызов: CBPRuntime::unserializeWorkflowStream
public function unserializeWorkflowStream(string $stream)
{
	$pos = mb_strpos($stream, ";");
	$usedActivities = mb_substr($stream, 0, $pos);
	$stream = mb_substr($stream, $pos + 1);

	foreach (explode(',', $usedActivities) as $activityCode)
	{
		$this->IncludeActivityFile($activityCode);
	}

	$classesList = array_map(
		function ($name)
		{
			return 'cbp'.$name;
		},
		$this->loadedActivities
	);

	/** @bug 0135642 */
	if (in_array('cbpstateactivity', $classesList))
	{
		$classesList[] = CBPStateEventActivitySubscriber::class;
	}
	if (in_array('cbplistenactivity', $classesList))
	{
		$classesList[] = CBPListenEventActivitySubscriber::class;
	}

	$classesList[] = CBPWorkflow::class;
	$classesList[] = CBPRuntime::class;
	$classesList[] = DebugWorkflow::class;
	$classesList[] = BizprocBaseTypeValueDate::class;
	$classesList[] = BizprocBaseTypeValueDateTime::class;
	$classesList[] = MainTypeDate::class;
	$classesList[] = MainTypeDateTime::class;
	$classesList[] = MainWebUri::class;
	$classesList[] = DateTime::class;
	$classesList[] = DateTimeZone::class;

	return unserialize($stream, ['allowed_classes' => $classesList]);
}

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