1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
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
(
$type
===
AccountTBankBusiness::TYPE_CODE
)
34
{
35
$oauthService =
new
AccountTBankBusiness
();
36
}
37
38
if
($oauthService)
39
{
40
$oauthService->setService(
Seo
\
Checkout
\
Service::getInstance
());
41
return
$oauthService;
42
}
43
44
throw
new
Main\SystemException
(
"Service with type: \"{$type}\" not found"
);
45
}
46
}
$type
$type
Определения
options.php:106
Bitrix\Main\SystemException
Определения
SystemException.php:9
Bitrix\Seo\Checkout\Service\getInstance
static getInstance()
Определения
service.php:21
Bitrix\Seo\Checkout\Services\AccountTBankBusiness
Определения
accounttbankbusiness.php:15
Bitrix\Seo\Checkout\Services\AccountTBankBusiness\TYPE_CODE
const TYPE_CODE
Определения
accounttbankbusiness.php:16
Bitrix\Seo\Checkout\Services\AccountYandex
Определения
accountyandex.php:19
Bitrix\Seo\Checkout\Services\AccountYandex\TYPE_CODE
const TYPE_CODE
Определения
accountyandex.php:20
Bitrix\Seo\Checkout\Services\AccountYookassa
Определения
accountyookassa.php:18
Bitrix\Seo\Checkout\Services\AccountYookassa\TYPE_CODE
const TYPE_CODE
Определения
accountyookassa.php:19
Bitrix\Seo\Checkout\Services\Factory
Определения
factory.php:13
Bitrix\Seo\Checkout\Services\Factory\createService
static createService(string $type)
Определения
factory.php:19
Bitrix\Seo\Checkout
Определения
authadapter.php:3
Bitrix\Seo
bitrix
modules
seo
lib
checkout
services
factory.php
Создано системой
1.14.0