PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.11
Booking for Appointments and Events Calendar – Amelia v1.2.11
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 4 years ago EventTag.php 7 years ago EventTicket.php 1 year ago
EventPeriod.php
232 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 /**
54 * @return Id
55 */
56 public function getId()
57 {
58 return $this->id;
59 }
60
61 /**
62 * @param Id $id
63 */
64 public function setId(Id $id)
65 {
66 $this->id = $id;
67 }
68
69 /**
70 * @return Id
71 */
72 public function getEventId()
73 {
74 return $this->eventId;
75 }
76
77 /**
78 * @param Id $eventId
79 */
80 public function setEventId(Id $eventId)
81 {
82 $this->eventId = $eventId;
83 }
84
85 /**
86 * @return DateTimeValue
87 */
88 public function getPeriodStart()
89 {
90 return $this->periodStart;
91 }
92
93 /**
94 * @param DateTimeValue $periodStart
95 */
96 public function setPeriodStart(DateTimeValue $periodStart)
97 {
98 $this->periodStart = $periodStart;
99 }
100
101 /**
102 * @return DateTimeValue
103 */
104 public function getPeriodEnd()
105 {
106 return $this->periodEnd;
107 }
108
109 /**
110 * @param DateTimeValue $periodEnd
111 */
112 public function setPeriodEnd(DateTimeValue $periodEnd)
113 {
114 $this->periodEnd = $periodEnd;
115 }
116
117 /**
118 * @return ZoomMeeting
119 */
120 public function getZoomMeeting()
121 {
122 return $this->zoomMeeting;
123 }
124
125 /**
126 * @param ZoomMeeting $zoomMeeting
127 */
128 public function setZoomMeeting(ZoomMeeting $zoomMeeting)
129 {
130 $this->zoomMeeting = $zoomMeeting;
131 }
132
133 /**
134 * @return string
135 */
136 public function getLessonSpace()
137 {
138 return $this->lessonSpace;
139 }
140
141 /**
142 * @param string $lessonSpace
143 */
144 public function setLessonSpace($lessonSpace)
145 {
146 $this->lessonSpace = $lessonSpace;
147 }
148
149 /**
150 * @return Collection
151 */
152 public function getBookings()
153 {
154 return $this->bookings;
155 }
156
157 /**
158 * @param Collection $bookings
159 */
160 public function setBookings(Collection $bookings)
161 {
162 $this->bookings = $bookings;
163 }
164
165 /**
166 * @return Token
167 */
168 public function getGoogleCalendarEventId()
169 {
170 return $this->googleCalendarEventId;
171 }
172
173 /**
174 * @param Token $googleCalendarEventId
175 */
176 public function setGoogleCalendarEventId($googleCalendarEventId)
177 {
178 $this->googleCalendarEventId = $googleCalendarEventId;
179 }
180
181 /**
182 * @return string
183 */
184 public function getGoogleMeetUrl()
185 {
186 return $this->googleMeetUrl;
187 }
188
189 /**
190 * @param string $googleMeetUrl
191 */
192 public function setGoogleMeetUrl($googleMeetUrl)
193 {
194 $this->googleMeetUrl = $googleMeetUrl;
195 }
196
197 /**
198 * @return Label
199 */
200 public function getOutlookCalendarEventId()
201 {
202 return $this->outlookCalendarEventId;
203 }
204
205 /**
206 * @param Label $outlookCalendarEventId
207 */
208 public function setOutlookCalendarEventId($outlookCalendarEventId)
209 {
210 $this->outlookCalendarEventId = $outlookCalendarEventId;
211 }
212
213 /**
214 * @return array
215 */
216 public function toArray()
217 {
218 return [
219 'id' => $this->getId() ? $this->getId()->getValue() : null,
220 'eventId' => $this->getEventId() ? $this->getEventId()->getValue() : null,
221 'periodStart' => $this->getPeriodStart()->getValue()->format('Y-m-d H:i:s'),
222 'periodEnd' => $this->getPeriodEnd()->getValue()->format('Y-m-d H:i:s'),
223 'zoomMeeting' => $this->getZoomMeeting() ? $this->getZoomMeeting()->toArray() : null,
224 'lessonSpace' => $this->getLessonSpace() ?: null,
225 'bookings' => $this->getBookings() ? $this->getBookings()->toArray() : [],
226 'googleCalendarEventId' => $this->getGoogleCalendarEventId() ? $this->getGoogleCalendarEventId()->getValue(): null,
227 'googleMeetUrl' => $this->getGoogleMeetUrl(),
228 'outlookCalendarEventId' => $this->getOutlookCalendarEventId() ? $this->getOutlookCalendarEventId()->getValue() : null
229 ];
230 }
231 }
232