1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
type.php
См. документацию.
1<?php
2
3namespace Bitrix\Location\Entity\Location;
4
10class 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}
$type
Определения options.php:106
static isValueExist(int $value)
Определения type.php:38
const SUB_LOCALITY_LEVEL_2
Определения type.php:24
const ADDRESS_LINE_1
Определения type.php:28
const ADM_LEVEL_2
Определения type.php:17
const SUB_LOCALITY
Определения type.php:22
static isTypeExist(string $type)
Определения type.php:33
const ADM_LEVEL_4
Определения type.php:19
const SUB_LOCALITY_LEVEL_1
Определения type.php:23
const ADM_LEVEL_3
Определения type.php:18
const ADM_LEVEL_1
Определения type.php:16