1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
baseservice.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Location\Common
;
4
5
use
Bitrix\Location\Infrastructure\Service\Config\Container
;
6
use
Bitrix\Location\Infrastructure\Service\Config\Factory
;
7
use
Bitrix\Location\Infrastructure\Service\ErrorService
;
8
use
Bitrix\Main\Error
;
9
10
abstract
class
BaseService
11
{
13
protected
static
$instance
;
14
15
public
function
__clone
(){}
16
public
function
__wakeup
(){}
17
21
public
static
function
getInstance
()
22
{
23
if
(empty(static::$instance))
24
{
25
static::$instance = static::createInstance(
26
static::getConfig(static::class)
27
);
28
}
29
30
return
static::$instance;
31
}
32
33
protected
static
function
createInstance
(
Container
$config
)
34
{
35
return
new
static
(
$config
);
36
}
37
38
protected
function
processException
(\
Exception
$exception): void
39
{
40
ErrorService::getInstance
()->addError(
41
new
Error
($exception->getMessage(), $exception->getCode())
42
);
43
}
44
45
protected
function
__construct
(
Container
$config
)
46
{
47
}
48
49
protected
static
function
getConfig
(
string
$class)
50
{
51
return
Factory::createConfig($class);
52
}
53
}
Bitrix\Location\Common\BaseService
Определения
baseservice.php:11
Bitrix\Location\Common\BaseService\getConfig
static getConfig(string $class)
Определения
baseservice.php:49
Bitrix\Location\Common\BaseService\__construct
__construct(Container $config)
Определения
baseservice.php:45
Bitrix\Location\Common\BaseService\__wakeup
__wakeup()
Определения
baseservice.php:16
Bitrix\Location\Common\BaseService\createInstance
static createInstance(Container $config)
Определения
baseservice.php:33
Bitrix\Location\Common\BaseService\getInstance
static getInstance()
Определения
baseservice.php:21
Bitrix\Location\Common\BaseService\__clone
__clone()
Определения
baseservice.php:15
Bitrix\Location\Common\BaseService\$instance
static $instance
Определения
baseservice.php:13
Bitrix\Location\Common\BaseService\processException
processException(\Exception $exception)
Определения
baseservice.php:38
Bitrix\Location\Infrastructure\Service\Config\Container
Определения
container.php:8
Bitrix\Location\Infrastructure\Service\ErrorService
Определения
errorservice.php:21
Bitrix\Main\Error
Определения
error.php:15
Bitrix\Location\Common
Определения
baseservice.php:3
Bitrix\Location\Entity\Location\Factory
Определения
ormfactory.php:3
Bitrix\Main\DI\Exception
Определения
circulardependencyexception.php:3
$config
$config
Определения
quickway.php:69
bitrix
modules
location
lib
common
baseservice.php
Создано системой
1.14.0