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