Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
eventcollection.php
1<?php
2
11
13{
14 private static $instance;
15
16 private $registry = [];
17
21 private function __construct()
22 {
23
24 }
25
29 public static function getInstance(): self
30 {
31 if (!self::$instance)
32 {
33 self::$instance = new self();
34 }
35
36 return self::$instance;
37 }
38
42 public function list(): array
43 {
44 return $this->registry;
45 }
46
50 public function push(Event $event): void
51 {
52 $this->registry[] = $event;
53 }
54}