Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
factory.php
1<?php
2
4
6use Bitrix\Seo;
7
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}
static createService(string $type)
Definition factory.php:19