PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.20
Booking for Appointments and Events Calendar – Amelia v1.2.20
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / src / Domain / Entity / Booking / Event / EventPeriod.php
ameliabooking / src / Domain / Entity / Booking / Event Last commit date
CustomerBookingEventPeriod.php 7 years ago CustomerBookingEventTicket.php 4 years ago Event.php 2 years ago EventPeriod.php 1 year ago EventTag.php 7 years ago EventTicket.php 1 year ago
EventPeriod.php
272 lines
1 <?php
2 /**
3 * @copyright © TMS-Plugins. All rights reserved.
4 * @licence See LICENCE.md for license details.
5 */
6
7 namespace AmeliaBooking\Domain\Entity\Booking\Event;
8
9 use AmeliaBooking\Domain\Collection\Collection;
10 use AmeliaBooking\Domain\ValueObjects\DateTime\DateTimeValue;
11 use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id;
12 use AmeliaBooking\Domain\Entity\Zoom\ZoomMeeting;
13 use AmeliaBooking\Domain\ValueObjects\String\Token;
14 use AmeliaBooking\Domain\ValueObjects\String\Label;
15
16 /**
17 * Class EventPeriod
18 *
19 * @package AmeliaBooking\Domain\Entity\Booking\Event
20 */
21 class EventPeriod
22 {
23 /** @var Id */
24 private $id;
25
26 /** @var Id */
27 private $eventId;
28
29 /** @var DateTimeValue */
30 protected $periodStart;
31
32 /** @var DateTimeValue */
33 protected $periodEnd;
34
35 /** @var ZoomMeeting */
36 private $zoomMeeting;
37
38 /** @var string */
39 private $lessonSpace;
40
41 /** @var Collection */
42 protected $bookings;
43
44 /** @var Token */
45 private $googleCalendarEventId;
46
47 /** @var string */
48 private $googleMeetUrl;
49
50 /** @var Label */
51 private $outlookCalendarEventId;
52
53 /** @var string */
54 private $microsoftTeamsUrl;
55
56 /** @var Label */
57 private $appleCalendarEventId;
58
59 /**
60 * @return Id
61 */
62 public function getId()
63 {
64 return $this->id;
65 }
66
67 /**
68 * @param Id $id
69 */
70 public function setId(Id $id)
71 {
72 $this->id = $id;
73 }
74
75 /**
76 * @return Id
77 */
78 public function getEventId()
79 {
80 return $this->eventId;
81 }
82
83 /**
84 * @param Id $eventId
85 */
86 public function setEventId(Id $eventId)
87 {
88 $this->eventId = $eventId;
89 }
90
91 /**
92 * @return DateTimeValue
93 */
94 public function getPeriodStart()
95 {
96 return $this->periodStart;
97 }
98
99 /**
100 * @param DateTimeValue $periodStart
101 */
102 public function setPeriodStart(DateTimeValue $periodStart)
103 {
104 $this->periodStart = $periodStart;
105 }
106
107 /**
108 * @return DateTimeValue
109 */
110 public function getPeriodEnd()
111 {
112 return $this->periodEnd;
113 }
114
115 /**
116 * @param DateTimeValue $periodEnd
117 */
118 public function setPeriodEnd(DateTimeValue $periodEnd)
119 {
120 $this->periodEnd = $periodEnd;
121 }
122
123 /**
124 * @return ZoomMeeting
125 */
126 public function getZoomMeeting()
127 {
128 return $this->zoomMeeting;
129 }
130
131 /**
132 * @param ZoomMeeting $zoomMeeting
133 */
134 public function setZoomMeeting(ZoomMeeting $zoomMeeting)
135 {
136 $this->zoomMeeting = $zoomMeeting;
137 }
138
139 /**
140 * @return string
141 */
142 public function getLessonSpace()
143 {
144 return $this->lessonSpace;
145 }
146
147 /**
148 * @param string $lessonSpace
149 */
150 public function setLessonSpace($lessonSpace)
151 {
152 $this->lessonSpace = $lessonSpace;
153 }
154
155 /**
156 * @return Collection
157 */
158 public function getBookings()
159 {
160 return $this->bookings;
161 }
162
163 /**
164 * @param Collection $bookings
165 */
166 public function setBookings(Collection $bookings)
167 {
168 $this->bookings = $bookings;
169 }
170
171 /**
172 * @return Token
173 */
174 public function getGoogleCalendarEventId()
175 {
176 return $this->googleCalendarEventId;
177 }
178
179 /**
180 * @param Token $googleCalendarEventId
181 */
182 public function setGoogleCalendarEventId($googleCalendarEventId)
183 {
184 $this->googleCalendarEventId = $googleCalendarEventId;
185 }
186
187 /**
188 * @return string
189 */
190 public function getGoogleMeetUrl()
191 {
192 return $this->googleMeetUrl;
193 }
194
195 /**
196 * @param string $googleMeetUrl
197 */
198 public function setGoogleMeetUrl($googleMeetUrl)
199 {
200 $this->googleMeetUrl = $googleMeetUrl;
201 }
202
203 /**
204 * @return Label
205 */
206 public function getOutlookCalendarEventId()
207 {
208 return $this->outlookCalendarEventId;
209 }
210
211 /**
212 * @param Label $outlookCalendarEventId
213 */
214 public function setOutlookCalendarEventId($outlookCalendarEventId)
215 {
216 $this->outlookCalendarEventId = $outlookCalendarEventId;
217 }
218
219 /**
220 * @return string
221 */
222 public function getMicrosoftTeamsUrl()
223 {
224 return $this->microsoftTeamsUrl;
225 }
226
227 /**
228 * @param string $microsoftTeamsUrl
229 */
230 public function setMicrosoftTeamsUrl($microsoftTeamsUrl)
231 {
232 $this->microsoftTeamsUrl = $microsoftTeamsUrl;
233 }
234
235 /**
236 * @return Label
237 */
238 public function getAppleCalendarEventId()
239 {
240 return $this->appleCalendarEventId;
241 }
242
243 /**
244 * @param Label $appleCalendarEventId
245 */
246 public function setAppleCalendarEventId($appleCalendarEventId)
247 {
248 $this->appleCalendarEventId = $appleCalendarEventId;
249 }
250
251 /**
252 * @return array
253 */
254 public function toArray()
255 {
256 return [
257 'id' => $this->getId() ? $this->getId()->getValue() : null,
258 'eventId' => $this->getEventId() ? $this->getEventId()->getValue() : null,
259 'periodStart' => $this->getPeriodStart()->getValue()->format('Y-m-d H:i:s'),
260 'periodEnd' => $this->getPeriodEnd()->getValue()->format('Y-m-d H:i:s'),
261 'zoomMeeting' => $this->getZoomMeeting() ? $this->getZoomMeeting()->toArray() : null,
262 'lessonSpace' => $this->getLessonSpace() ?: null,
263 'bookings' => $this->getBookings() ? $this->getBookings()->toArray() : [],
264 'googleCalendarEventId' => $this->getGoogleCalendarEventId() ? $this->getGoogleCalendarEventId()->getValue(): null,
265 'googleMeetUrl' => $this->getGoogleMeetUrl(),
266 'outlookCalendarEventId' => $this->getOutlookCalendarEventId() ? $this->getOutlookCalendarEventId()->getValue() : null,
267 'microsoftTeamsUrl' => $this->getMicrosoftTeamsUrl(),
268 'appleCalendarEventId' => $this->getAppleCalendarEventId() ? $this->getAppleCalendarEventId()->getValue() : null,
269 ];
270 }
271 }
272