Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
Registry.php
1
<?php
2
3
namespace
Bitrix\Im\V2
;
4
8
class
Registry
extends
\ArrayObject
9
{
10
public
function
unsetByKeys
(array $keys): void
11
{
12
foreach
($keys as $key)
13
{
14
unset($this[$key]);
15
}
16
}
17
22
public
function
filter
(callable $predicate): self
23
{
24
$newCollection = clone $this;
25
$keyToUnset = [];
26
27
foreach
($newCollection as $key => $item)
28
{
29
if
(!$predicate($item))
30
{
31
$keyToUnset[] = $key;
32
}
33
}
34
35
foreach
($keyToUnset as $key)
36
{
37
unset($newCollection[$key]);
38
}
39
40
return
$newCollection;
41
}
42
46
public
function
getAny
()
47
{
48
foreach
($this as $item)
49
{
50
return
$item;
51
}
52
53
return
null
;
54
}
55
}
Bitrix\Im\V2\Registry
Definition
Registry.php:9
Bitrix\Im\V2\Registry\filter
filter(callable $predicate)
Definition
Registry.php:22
Bitrix\Im\V2\Registry\getAny
getAny()
Definition
Registry.php:46
Bitrix\Im\V2\Registry\unsetByKeys
unsetByKeys(array $keys)
Definition
Registry.php:10
Bitrix\Im\V2
Definition
ActionUuid.php:3
modules
im
lib
V2
Registry.php
Создано системой
1.10.0