• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/exchange/integration/service/batchable/base.php
  • Класс: BitrixSaleExchangeIntegrationServiceBatchableBase
  • Вызов: Base::factoryClient
protected function factoryClient($typeName)
{
	$typeId = BusinessValuePersonDomainType::resolveID($typeName);

	if(BusinessValuePersonDomainType::isDefined($typeId))
	{
		if($typeName == BusinessValuePersonDomainType::TYPE_E_NAME)
		{
			return new Company();
		}
		elseif($typeName == BusinessValuePersonDomainType::TYPE_I_NAME)
		{
			return new Contact();
		}
	}

	throw new BitrixMainNotSupportedException("Client : '".$typeId."' is not supported in current context");
}