Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
container.php
1
<?php
2
3
namespace
Bitrix\Location\Infrastructure\Service\Config
;
4
5
use \Bitrix\Location\Exception\ErrorCodes;
6
7
final
class
Container
8
{
9
private
$configValues = [];
10
11
public
function
__construct
(array $configValues)
12
{
13
$this->configValues = $configValues;
14
}
15
16
public
function
get
($id)
17
{
18
if
(!$this->
has
($id))
19
{
20
throw
new \LogicException(
21
"Sevice configuration container does not contain '{$id}' value"
,
22
ErrorCodes::SERVICE_CONFIG_VALUE_NOT_FOUND
23
);
24
}
25
26
return
$this->configValues[$id];
27
}
28
29
public
function
has
($id)
30
{
31
return
array_key_exists($id, $this->configValues);
32
}
33
}
Bitrix\Location\Infrastructure\Service\Config\Container
Definition
container.php:8
Bitrix\Location\Infrastructure\Service\Config\Container\has
has($id)
Definition
container.php:29
Bitrix\Location\Infrastructure\Service\Config\Container\__construct
__construct(array $configValues)
Definition
container.php:11
Bitrix\Location\Infrastructure\Service\Config
Definition
container.php:3
modules
location
lib
infrastructure
service
config
container.php
Создано системой
1.10.0