Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
externalidbuilder.php
1
<?php
2
3
namespace
Bitrix\Location\Source\Osm
;
4
10
final
class
ExternalIdBuilder
11
{
17
public
static
function
buildExternalId
(
string
$osmType,
int
$osmId): ?string
18
{
19
if
(!$osmType || !$osmId)
20
{
21
return
null
;
22
}
23
24
return
sprintf(
'%s%s'
, $osmType, $osmId);
25
}
26
31
public
static
function
getOsmTypeByExternalId
(
string
$externalId): ?string
32
{
33
return
(
string
)mb_substr($externalId, 0, 1);
34
}
35
40
public
static
function
getOsmIdByExternalId
(
string
$externalId): ?int
41
{
42
return
(
int
)mb_substr($externalId, 1);
43
}
44
}
Bitrix\Location\Source\Osm\ExternalIdBuilder
Definition
externalidbuilder.php:11
Bitrix\Location\Source\Osm\ExternalIdBuilder\buildExternalId
static buildExternalId(string $osmType, int $osmId)
Definition
externalidbuilder.php:17
Bitrix\Location\Source\Osm\ExternalIdBuilder\getOsmIdByExternalId
static getOsmIdByExternalId(string $externalId)
Definition
externalidbuilder.php:40
Bitrix\Location\Source\Osm\ExternalIdBuilder\getOsmTypeByExternalId
static getOsmTypeByExternalId(string $externalId)
Definition
externalidbuilder.php:31
Bitrix\Location\Source\Osm
modules
location
lib
source
osm
externalidbuilder.php
Создано системой
1.10.0