Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
normalizer.php
1
<?php
2
namespace
Bitrix\Location\Entity\Address\Normalizer
;
3
4
use
Bitrix\Main\ArgumentOutOfRangeException
;
5
13
class
Normalizer
implements
INormalizer
14
{
16
protected
$normalizers
= [];
17
23
public
function
__construct
(array
$normalizers
)
24
{
25
foreach
(
$normalizers
as $normalizer)
26
{
27
$this->
addNormalizer
($normalizer);
28
}
29
}
30
35
protected
function
addNormalizer
(
INormalizer
$normalizer): void
36
{
37
$this->normalizers[] = $normalizer;
38
}
39
44
public
function
normalize
(
string
$string): string
45
{
46
$result = $string;
47
48
foreach
($this->normalizers as $normalizer)
49
{
50
$result = $normalizer->normalize($result);
51
}
52
53
return
$result;
54
}
55
}
Bitrix\Location\Entity\Address\Normalizer\Normalizer
Definition
normalizer.php:14
Bitrix\Location\Entity\Address\Normalizer\Normalizer\$normalizers
$normalizers
Definition
normalizer.php:16
Bitrix\Location\Entity\Address\Normalizer\Normalizer\normalize
normalize(string $string)
Definition
normalizer.php:44
Bitrix\Location\Entity\Address\Normalizer\Normalizer\addNormalizer
addNormalizer(INormalizer $normalizer)
Definition
normalizer.php:35
Bitrix\Location\Entity\Address\Normalizer\Normalizer\__construct
__construct(array $normalizers)
Definition
normalizer.php:23
Bitrix\Main\ArgumentOutOfRangeException
Definition
exception.php:67
Bitrix\Location\Entity\Address\Normalizer\INormalizer
Definition
inormalizer.php:11
Bitrix\Location\Entity\Address\Normalizer
Definition
builder.php:3
modules
location
lib
entity
address
normalizer
normalizer.php
Создано системой
1.10.0