1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
servicefactory.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Seo\BusinessSuite\Utils;
4
5
use Bitrix\Seo;
6
use Bitrix\Seo\BusinessSuite\Exception;
7
8
final
class
ServiceFactory
9
{
11
private
static
$enginePool;
12
16
private
static
function
getServices() :
array
17
{
18
return
[
19
Seo\BusinessSuite\Service::getInstance
(),
20
Seo\LeadAds\Service::getInstance
(),
21
Seo\Analytics\Service::getInstance
(),
22
Seo\Retargeting\Service::getInstance
(),
23
Seo\Marketing\Service::getInstance
(),
24
Seo\Catalog\Service::getInstance
()
25
];
26
}
27
31
private
static
function
getEnginePool() :
array
32
{
33
if
(!static::$enginePool)
34
{
35
static::$enginePool = [];
36
foreach
(self::getServices() as
$service
)
37
{
38
foreach
($service::getTypes() as
$type
)
39
{
40
static::$enginePool[$service::getEngineCode(
$type
)] =
$service
;
41
}
42
}
43
}
44
return
static::$enginePool;
45
}
46
54
public
static
function
getServiceByEngineCode
(
string
$engineCode) :
Seo
\
BusinessSuite
\
IInternalService
55
{
56
if
(array_key_exists($engineCode,$pool = static::getEnginePool()))
57
{
58
return
$pool[$engineCode];
59
}
60
throw
new
Exception\ServiceLoadException
(
'EngineCode'
);
61
}
62
}
$type
$type
Определения
options.php:106
Bitrix\Seo\Analytics\Service\getInstance
static getInstance()
Определения
service.php:31
Bitrix\Seo\BusinessSuite\Exception\ServiceLoadException
Определения
serviceloadexception.php:7
Bitrix\Seo\BusinessSuite\Service\getInstance
static getInstance()
Определения
service.php:75
Bitrix\Seo\BusinessSuite\Utils\ServiceFactory
Определения
servicefactory.php:9
Bitrix\Seo\BusinessSuite\Utils\ServiceFactory\getServiceByEngineCode
static getServiceByEngineCode(string $engineCode)
Определения
servicefactory.php:54
Bitrix\Seo\Catalog\Service\getInstance
static getInstance()
Определения
service.php:28
Bitrix\Seo\LeadAds\Service\getInstance
static getInstance()
Определения
service.php:48
Bitrix\Seo\Marketing\Service\getInstance
static getInstance()
Определения
service.php:28
Bitrix\Seo\Retargeting\Service\getInstance
static getInstance()
Определения
service.php:25
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Seo\BusinessSuite\IInternalService
Определения
iinternalservice.php:8
Bitrix\Seo\BusinessSuite
Определения
abstractbase.php:3
Bitrix\Seo
$service
$service
Определения
payment.php:18
bitrix
modules
seo
lib
businesssuite
utils
servicefactory.php
Создано системой
1.14.0