Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
eventcollection.php
1
<?php
2
10
namespace
Bitrix\Socialnetwork\Internals\EventService
;
11
12
class
EventCollection
13
{
14
private
array $ids = [];
15
private
array $registry = [];
16
17
private
static
$instance;
18
22
private
function
__construct()
23
{
24
25
}
26
30
public
static
function
getInstance
(): self
31
{
32
if
(!self::$instance)
33
{
34
self::$instance =
new
self
();
35
}
36
37
return
self::$instance;
38
}
39
43
public
function
list
(): array
44
{
45
return
$this->registry;
46
}
47
51
public
function
push
(
Event
$event): void
52
{
53
$this->registry[$event->getHash()] = $event;
54
$this->ids[] = $event->getId();
55
}
56
60
public
function
getEventsId
(): array
61
{
62
return
$this->ids;
63
}
64
65
public
function
isEmpty
(): bool
66
{
67
return
empty($this->registry);
68
}
69
70
public
function
isDuplicate
(
Event
$event): bool
71
{
72
return
(isset($this->registry[$event->getHash()]));
73
}
74
}
Bitrix\Main\Event
Definition
event.php:5
Bitrix\Socialnetwork\Internals\EventService\EventCollection
Definition
eventcollection.php:13
Bitrix\Socialnetwork\Internals\EventService\EventCollection\push
push(Event $event)
Definition
eventcollection.php:51
Bitrix\Socialnetwork\Internals\EventService\EventCollection\list
list()
Definition
eventcollection.php:43
Bitrix\Socialnetwork\Internals\EventService\EventCollection\isDuplicate
isDuplicate(Event $event)
Definition
eventcollection.php:70
Bitrix\Socialnetwork\Internals\EventService\EventCollection\getEventsId
getEventsId()
Definition
eventcollection.php:60
Bitrix\Socialnetwork\Internals\EventService\EventCollection\getInstance
static getInstance()
Definition
eventcollection.php:30
Bitrix\Socialnetwork\Internals\EventService\EventCollection\isEmpty
isEmpty()
Definition
eventcollection.php:65
Bitrix\Socialnetwork\Internals\EventService
Definition
cleanagent.php:3
modules
socialnetwork
lib
internals
eventservice
eventcollection.php
Создано системой
1.10.0