CBP::addService

  1. Bitrix24 API (v. 23.675.0)
  2. bizproc
  3. CBP
  4. addService
  • Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/runtime.php
  • Класс: CBP
  • Вызов: CBP::addService
public function addService($name, CBPRuntimeService $service)
{
	if ($this->isStarted)
		throw new Exception("Runtime is started");

	$name = trim($name);
	if ($name == '')
		throw new Exception("Service code is empty");
	if (!$service)
		throw new Exception("Service is null");

	if (array_key_exists($name, $this->services))
		throw new Exception("Service is already exists");

	$this->services[$name] = $service;
}

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