Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
factory.php
1
<?php
2
3
namespace
Bitrix\Seo\Checkout\Services
;
4
5
use
Bitrix\Main
;
6
use
Bitrix\Seo
;
7
12
class
Factory
13
{
19
public
static
function
createService
(
string
$type)
20
{
21
$oauthService =
null
;
22
23
if
($type ===
AccountYandex::TYPE_CODE
)
24
{
25
$oauthService =
new
AccountYandex
();
26
}
27
28
if
($type ===
AccountYookassa::TYPE_CODE
)
29
{
30
$oauthService =
new
AccountYookassa
();
31
}
32
33
if
($oauthService)
34
{
35
$oauthService->setService(Seo\Checkout\
Service::getInstance
());
36
return
$oauthService;
37
}
38
39
throw
new
Main\SystemException
(
"Service with type: \"{$type}\" not found"
);
40
}
41
}
Bitrix\Main\SystemException
Definition
exception.php:8
Bitrix\Seo\Checkout\Service\getInstance
static getInstance()
Definition
service.php:20
Bitrix\Seo\Checkout\Services\AccountYandex
Definition
accountyandex.php:19
Bitrix\Seo\Checkout\Services\AccountYandex\TYPE_CODE
const TYPE_CODE
Definition
accountyandex.php:20
Bitrix\Seo\Checkout\Services\AccountYookassa
Definition
accountyookassa.php:18
Bitrix\Seo\Checkout\Services\AccountYookassa\TYPE_CODE
const TYPE_CODE
Definition
accountyookassa.php:19
Bitrix\Seo\Checkout\Services\Factory
Definition
factory.php:13
Bitrix\Seo\Checkout\Services\Factory\createService
static createService(string $type)
Definition
factory.php:19
Bitrix\Main
Bitrix\Seo\Checkout\Services
Definition
accountyandex.php:3
Bitrix\Seo
modules
seo
lib
checkout
services
factory.php
Создано системой
1.10.0