Your IP : 216.73.216.86


Current Path : /var/www/homesaver/www/bitrix/modules/sale/lib/exchange/integration/service/user/
Upload File :
Current File : /var/www/homesaver/www/bitrix/modules/sale/lib/exchange/integration/service/user/factory.php

<?php
namespace Bitrix\Sale\Exchange\Integration\Service\User;


use Bitrix\Sale\Exchange\Integration\Service\User\Entity;

class Factory
{
	static public function create($typeId)
	{
		if($typeId == EntityType::TYPE_I)
		{
			return new Entity\Contact();
		}
		elseif($typeId == EntityType::TYPE_E)
		{
			return new Entity\Company();
		}
		else
		{
			throw new \Bitrix\Main\NotSupportedException("Client type: '".$typeId."' is not supported in current context");
		}
	}
}