1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
factory.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\Core\Mappers;
4
5class Factory
6{
7 private static ?Section $sectionInstance = null;
8 private static ?Event $eventInstance = null;
9 private static ?SectionConnection $sectionConnectionInstance = null;
10 private static ?EventConnection $eventConnectionInstance = null;
11 private static ?SyncEvent $syncEventInstance = null;
12 private static ?Connection $connectionInstance = null;
13 private static ?EventOption $eventOptionInstance = null;
14 private static ?EventCategory $eventCategoryInstance = null;
15
16 public function getSection(): Section
17 {
18 if (!self::$sectionInstance)
19 {
20 self::$sectionInstance = new Section();
21 }
22
23 return self::$sectionInstance;
24 }
25
26
27 public function getEvent(): Event
28 {
29 if (!self::$eventInstance)
30 {
31 self::$eventInstance = new Event();
32 }
33
34 return self::$eventInstance;
35 }
36
38 {
39 if (!self::$sectionConnectionInstance)
40 {
41 self::$sectionConnectionInstance = new SectionConnection();
42 }
43
44 return self::$sectionConnectionInstance;
45 }
46
47
49 {
50 if (!self::$eventConnectionInstance)
51 {
52 self::$eventConnectionInstance = new EventConnection();
53 }
54
55 return self::$eventConnectionInstance;
56 }
57
58 public function getSyncEvent(): SyncEvent
59 {
60 if (!self::$syncEventInstance)
61 {
62 self::$syncEventInstance = new SyncEvent();
63 }
64
65 return self::$syncEventInstance;
66 }
67
68 public function getConnection(): Connection
69 {
70 if (!self::$connectionInstance)
71 {
72 self::$connectionInstance = new Connection();
73 }
74
75 return self::$connectionInstance;
76 }
77
78 public function getEventOption(): EventOption
79 {
80 if (!self::$eventOptionInstance)
81 {
82 self::$eventOptionInstance = new EventOption();
83 }
84
85 return self::$eventOptionInstance;
86 }
87
89 {
90 if (!self::$eventCategoryInstance)
91 {
92 self::$eventCategoryInstance = new EventCategory();
93 }
94
95 return self::$eventCategoryInstance;
96 }
97}