1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
map.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Calendar\Core\Base;
4
5
use Bitrix\Main\ArgumentException;
6
10
abstract
class
Map
extends
Collection
11
{
20
public
function
add
($item,
$key
=
null
): self
21
{
22
if
(
$key
===
null
)
23
{
24
throw
new
ArgumentException
(
'you must transfer the key'
);
25
}
26
27
$this->collection[
$key
] = $item;
28
29
if
($this->generator)
30
{
31
$this->generator->send($item);
32
}
33
34
return
$this;
35
}
36
42
public
function
addItems
(
array
$items
):
Collection
43
{
44
// $this->collection = array_replace($this->collection, $items);
45
46
$this->collection = $this->collection +
$items
;
47
return
$this;
48
}
49
55
public
function
getItem
(
$key
)
56
{
57
return
$this->collection[
$key
] ??
null
;
58
}
59
64
public
function
has
(
$key
): bool
65
{
66
return
isset($this->collection[
$key
]);
67
}
68
75
public
function
updateItem
($item,
$key
):
Map
76
{
77
$this->collection[
$key
] = $item;
78
79
return
$this;
80
}
81
86
public
function
getItemsByKeys
(
array
$keys):
Map
87
{
88
return
new
static
(array_intersect_key($this->collection, array_flip($keys)));
89
}
90
}
Bitrix\Calendar\Core\Base\Map
Определения
map.php:11
Bitrix\Calendar\Core\Base\Map\getItemsByKeys
getItemsByKeys(array $keys)
Определения
map.php:86
Bitrix\Calendar\Core\Base\Map\updateItem
updateItem($item, $key)
Определения
map.php:75
Bitrix\Calendar\Core\Base\Map\add
add($item, $key=null)
Определения
map.php:20
Bitrix\Calendar\Core\Base\Map\has
has($key)
Определения
map.php:64
Bitrix\Calendar\Core\Base\Map\addItems
addItems(array $items)
Определения
map.php:42
Bitrix\Calendar\Core\Base\Map\getItem
getItem($key)
Определения
map.php:55
Bitrix\Main\ArgumentException
Определения
ArgumentException.php:9
Bitrix\Main\ORM\Objectify\Collection
Определения
collection.php:33
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$key
if(empty($signedUserToken)) $key
Определения
quickway.php:257
$items
$items
Определения
template.php:224
bitrix
modules
calendar
lib
core
base
map.php
Создано системой
1.14.0