Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
deconverter.php
1
<?php
2
3
namespace
Bitrix\Location\Source\Osm\Converters
;
4
13
final
class
DeConverter
extends
BaseConverter
14
{
16
private
const
LAND_ADMIN_LEVEL = 4;
17
23
private
const
BERLIN_LAND_RELATION_ID = 62422;
24
30
private
const
HAMBURG_LAND_RELATION_ID = 62782;
31
35
protected
function
getAdminLevel1
(): ?array
36
{
37
foreach
($this->addressComponents as $addressComponent)
38
{
39
if
($this->
isAdministrativeBoundary
($addressComponent)
40
&& $addressComponent[
'admin_level'
] === static::LAND_ADMIN_LEVEL
41
)
42
{
43
return
$addressComponent;
44
}
45
}
46
47
return
null
;
48
}
49
53
protected
function
getCityStateRelationIds
(): array
54
{
55
return
[
56
static::BERLIN_LAND_RELATION_ID,
57
static::HAMBURG_LAND_RELATION_ID,
58
];
59
}
60
}
Bitrix\Location\Source\Osm\Converters\BaseConverter
Definition
baseconverter.php:27
Bitrix\Location\Source\Osm\Converters\BaseConverter\isAdministrativeBoundary
isAdministrativeBoundary($addressComponent)
Definition
baseconverter.php:593
Bitrix\Location\Source\Osm\Converters\DeConverter
Definition
deconverter.php:14
Bitrix\Location\Source\Osm\Converters\DeConverter\getAdminLevel1
getAdminLevel1()
Definition
deconverter.php:35
Bitrix\Location\Source\Osm\Converters\DeConverter\getCityStateRelationIds
getCityStateRelationIds()
Definition
deconverter.php:53
Bitrix\Location\Source\Osm\Converters
Definition
baseconverter.php:3
modules
location
lib
source
osm
converters
deconverter.php
Создано системой
1.10.0