Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
type.php
1
<?php
2
3
namespace
Bitrix\Location\Entity\Location
;
4
10
class
Type
11
{
12
public
const
UNKNOWN
= 0;
13
14
public
const
COUNTRY
= 100;
15
16
public
const
ADM_LEVEL_1
= 200;
17
public
const
ADM_LEVEL_2
= 210;
18
public
const
ADM_LEVEL_3
= 220;
19
public
const
ADM_LEVEL_4
= 230;
20
21
public
const
LOCALITY
= 300;
22
public
const
SUB_LOCALITY
= 310;
23
public
const
SUB_LOCALITY_LEVEL_1
= 320;
24
public
const
SUB_LOCALITY_LEVEL_2
= 330;
25
public
const
STREET
= 340;
26
27
public
const
BUILDING
= 400;
28
public
const
ADDRESS_LINE_1
= 410;
29
30
public
const
FLOOR
= 420;
31
public
const
ROOM
= 430;
32
33
public
static
function
isTypeExist
(
string
$type): bool
34
{
35
return
defined(static::class.
'::'
.$type);
36
}
37
38
public
static
function
isValueExist
(
int
$value): bool
39
{
40
$reflection = new \ReflectionClass(static::class);
41
$values = array_values($reflection->getConstants());
42
43
return
in_array($value, $values,
true
);
44
}
45
}
Bitrix\Location\Entity\Location\Type\COUNTRY
const COUNTRY
Definition
type.php:14
Bitrix\Location\Entity\Location\Type\isValueExist
static isValueExist(int $value)
Definition
type.php:38
Bitrix\Location\Entity\Location\Type\SUB_LOCALITY_LEVEL_2
const SUB_LOCALITY_LEVEL_2
Definition
type.php:24
Bitrix\Location\Entity\Location\Type\STREET
const STREET
Definition
type.php:25
Bitrix\Location\Entity\Location\Type\ADDRESS_LINE_1
const ADDRESS_LINE_1
Definition
type.php:28
Bitrix\Location\Entity\Location\Type\ADM_LEVEL_2
const ADM_LEVEL_2
Definition
type.php:17
Bitrix\Location\Entity\Location\Type\SUB_LOCALITY
const SUB_LOCALITY
Definition
type.php:22
Bitrix\Location\Entity\Location\Type\ROOM
const ROOM
Definition
type.php:31
Bitrix\Location\Entity\Location\Type\isTypeExist
static isTypeExist(string $type)
Definition
type.php:33
Bitrix\Location\Entity\Location\Type\FLOOR
const FLOOR
Definition
type.php:30
Bitrix\Location\Entity\Location\Type\ADM_LEVEL_4
const ADM_LEVEL_4
Definition
type.php:19
Bitrix\Location\Entity\Location\Type\SUB_LOCALITY_LEVEL_1
const SUB_LOCALITY_LEVEL_1
Definition
type.php:23
Bitrix\Location\Entity\Location\Type\UNKNOWN
const UNKNOWN
Definition
type.php:12
Bitrix\Location\Entity\Location\Type\ADM_LEVEL_3
const ADM_LEVEL_3
Definition
type.php:18
Bitrix\Location\Entity\Location\Type\BUILDING
const BUILDING
Definition
type.php:27
Bitrix\Location\Entity\Location\Type\ADM_LEVEL_1
const ADM_LEVEL_1
Definition
type.php:16
Bitrix\Location\Entity\Location\Type\LOCALITY
const LOCALITY
Definition
type.php:21
Bitrix\Location\Entity\Location
Definition
collection.php:3
Bitrix\Main\Type
Definition
collection.php:2
modules
location
lib
entity
location
type.php
Создано системой
1.10.0