Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
factory.php
1
<?php
2
namespace
Bitrix\Sale\Exchange\Integration\Service\User
;
3
4
5
use
Bitrix\Sale\Exchange\Integration\Service\User\Entity
;
6
7
class
Factory
8
{
9
static
public
function
create
($typeId)
10
{
11
if
($typeId ==
EntityType::TYPE_I
)
12
{
13
return
new
Entity\Contact
();
14
}
15
elseif($typeId ==
EntityType::TYPE_E
)
16
{
17
return
new
Entity\Company
();
18
}
19
else
20
{
21
throw
new \Bitrix\Main\NotSupportedException(
"Client type: '"
.$typeId.
"' is not supported in current context"
);
22
}
23
}
24
}
Bitrix\Sale\Exchange\Integration\Service\User\Entity\Company
Definition
company.php:7
Bitrix\Sale\Exchange\Integration\Service\User\Entity\Contact
Definition
contact.php:7
Bitrix\Sale\Exchange\Integration\Service\User\EntityType\TYPE_E
const TYPE_E
Definition
entitytype.php:9
Bitrix\Sale\Exchange\Integration\Service\User\EntityType\TYPE_I
const TYPE_I
Definition
entitytype.php:8
Bitrix\Sale\Exchange\Integration\Service\User\Factory
Definition
factory.php:8
Bitrix\Sale\Exchange\Integration\Service\User\Factory\create
static create($typeId)
Definition
factory.php:9
Bitrix\Sale\Exchange\Integration\Service\User\Entity
Definition
base.php:2
Bitrix\Sale\Exchange\Integration\Service\User
modules
sale
lib
exchange
integration
service
user
factory.php
Создано системой
1.10.0