Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
base.php
1
<?php
2
3
namespace
Bitrix\Location\Repository\Location\Strategy
;
4
5
use
Bitrix\Location\Repository\Location\IRepository
;
6
use
Bitrix\Main\ArgumentOutOfRangeException
;
7
12
abstract
class
Base
13
{
15
protected
$locationRepositories
= [];
16
17
const
REPO_PRIORITY_A
=
'A'
;
18
const
REPO_PRIORITY_B
=
'B'
;
19
const
REPO_PRIORITY_C
=
'C'
;
20
26
public
function
__construct
(array
$locationRepositories
= [])
27
{
28
$this->
setLocationRepositories
(
$locationRepositories
);
29
}
30
35
public
function
setLocationRepositories
(array
$locationRepositories
):
Base
36
{
37
foreach
(
$locationRepositories
as $repository)
38
{
39
if
(!($repository instanceof
IRepository
))
40
{
41
throw
new
ArgumentOutOfRangeException
(
'locationRepositories'
);
42
}
43
44
$this->locationRepositories[] = $repository;
45
}
46
47
return
$this;
48
}
49
}
Bitrix\Location\Repository\Location\Strategy\Base
Definition
base.php:13
Bitrix\Location\Repository\Location\Strategy\Base\__construct
__construct(array $locationRepositories=[])
Definition
base.php:26
Bitrix\Location\Repository\Location\Strategy\Base\REPO_PRIORITY_C
const REPO_PRIORITY_C
Definition
base.php:19
Bitrix\Location\Repository\Location\Strategy\Base\$locationRepositories
$locationRepositories
Definition
base.php:15
Bitrix\Location\Repository\Location\Strategy\Base\REPO_PRIORITY_B
const REPO_PRIORITY_B
Definition
base.php:18
Bitrix\Location\Repository\Location\Strategy\Base\setLocationRepositories
setLocationRepositories(array $locationRepositories)
Definition
base.php:35
Bitrix\Location\Repository\Location\Strategy\Base\REPO_PRIORITY_A
const REPO_PRIORITY_A
Definition
base.php:17
Bitrix\Main\ArgumentOutOfRangeException
Definition
exception.php:67
Bitrix\Location\Repository\Location\IRepository
Definition
irepository.php:11
Bitrix\Location\Repository\Location\Strategy
Definition
base.php:3
modules
location
lib
repository
location
strategy
base.php
Создано системой
1.10.0