Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
restrictioninfocollection.php
1
<?php
2
3
namespace
Bitrix\Sale\Services\Base
;
4
5
final
class
RestrictionInfoCollection
implements
\IteratorAggregate
6
{
7
9
private
array $restrictionInfoCollection = [];
10
11
public
function
__construct
(
RestrictionInfo
...$restrictionInfoList)
12
{
13
foreach
($restrictionInfoList as $restrictionInfo)
14
{
15
$this->
add
($restrictionInfo);
16
}
17
}
18
19
public
function
add
(
RestrictionInfo
$restrictionInfo): void
20
{
21
$this->restrictionInfoCollection[$restrictionInfo->
getType
()] = $restrictionInfo;
22
}
23
24
public
function
delete
(
string
$restrictionType): void
25
{
26
unset($this->restrictionInfoCollection[$restrictionType]);
27
}
28
29
public
function
get
(
string
$restrictionType): ?
RestrictionInfo
30
{
31
return
$this->restrictionInfoCollection[$restrictionType] ??
null
;
32
}
33
34
public
function
getIterator
(): \ArrayIterator
35
{
36
return
(
new
\ArrayIterator($this->restrictionInfoCollection));
37
}
38
}
Bitrix\Sale\Services\Base\RestrictionInfoCollection
Definition
restrictioninfocollection.php:6
Bitrix\Sale\Services\Base\RestrictionInfoCollection\__construct
__construct(RestrictionInfo ... $restrictionInfoList)
Definition
restrictioninfocollection.php:11
Bitrix\Sale\Services\Base\RestrictionInfoCollection\getIterator
getIterator()
Definition
restrictioninfocollection.php:34
Bitrix\Sale\Services\Base\RestrictionInfoCollection\add
add(RestrictionInfo $restrictionInfo)
Definition
restrictioninfocollection.php:19
Bitrix\Sale\Services\Base\RestrictionInfo
Definition
restrictioninfo.php:6
Bitrix\Sale\Services\Base\RestrictionInfo\getType
getType()
Definition
restrictioninfo.php:16
Bitrix\Sale\Services\Base
Definition
concreteproductrestriction.php:3
modules
sale
lib
services
base
restrictioninfocollection.php
Создано системой
1.10.0