PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.32
Booking for Appointments and Events Calendar – Amelia v1.2.32
2.4.9 2.4.8 2.4.7 2.4.6 2.4.5 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 / User / Provider.php
ameliabooking / src / Domain / Entity / User Last commit date
AbstractUser.php 1 year ago Admin.php 1 year ago AppleCalendarEmployeeConnect.php 1 year ago Customer.php 1 year ago Manager.php 1 year ago Provider.php 1 year ago
Provider.php
350 lines
1 <?php
2
3 namespace AmeliaBooking\Domain\Entity\User;
4
5 use AmeliaBooking\Domain\Collection\Collection;
6 use AmeliaBooking\Domain\Entity\Google\GoogleCalendar;
7 use AmeliaBooking\Domain\Entity\Outlook\OutlookCalendar;
8 use AmeliaBooking\Domain\Entity\Stripe\StripeConnect;
9 use AmeliaBooking\Domain\ValueObjects\BooleanValueObject;
10 use AmeliaBooking\Domain\ValueObjects\Number\Integer\Id;
11 use AmeliaBooking\Domain\ValueObjects\String\Description;
12 use AmeliaBooking\Domain\ValueObjects\String\Email;
13 use AmeliaBooking\Domain\ValueObjects\String\Name;
14 use AmeliaBooking\Domain\ValueObjects\String\Phone;
15
16 /**
17 * Class Provider
18 *
19 * @package AmeliaBooking\Domain\Entity\User
20 */
21 class Provider extends AbstractUser
22 {
23 /** @var Collection */
24 private $weekDayList;
25
26 /** @var Collection */
27 private $serviceList;
28
29 /** @var Collection */
30 private $dayOffList;
31
32 /** @var Collection */
33 private $specialDayList;
34
35 /** @var Collection */
36 private $appointmentList;
37
38 /** @var Id */
39 private $locationId;
40
41 /** @var GoogleCalendar */
42 private $googleCalendar;
43
44 /** @var OutlookCalendar */
45 private $outlookCalendar;
46
47 /** @var Name */
48 private $timeZone;
49
50 /** @var Description */
51 private $description;
52
53 /** @var Id */
54 private $badgeId;
55
56 /** @var StripeConnect */
57 private $stripeConnect;
58
59 /** @var AppleCalendarEmployeeConnect */
60 private $employeeAppleCalendar;
61
62 /** @var BooleanValueObject */
63 private $show;
64
65
66 /**
67 * @param Name $firstName
68 * @param Name $lastName
69 * @param Email $email
70 * @param Phone $phone
71 * @param Collection $weekDayList
72 * @param Collection $serviceList
73 * @param Collection $dayOffList
74 * @param Collection $specialDayList
75 * @param Collection $appointmentList
76 */
77 public function __construct(
78 Name $firstName,
79 Name $lastName,
80 Email $email,
81 Phone $phone,
82 Collection $weekDayList,
83 Collection $serviceList,
84 Collection $dayOffList,
85 Collection $specialDayList,
86 Collection $appointmentList
87 ) {
88 parent::__construct($firstName, $lastName, $email);
89 $this->phone = $phone;
90 $this->weekDayList = $weekDayList;
91 $this->serviceList = $serviceList;
92 $this->dayOffList = $dayOffList;
93 $this->specialDayList = $specialDayList;
94 $this->appointmentList = $appointmentList;
95 }
96
97 /**
98 * Get the user type in a string form
99 */
100 public function getType()
101 {
102 return self::USER_ROLE_PROVIDER;
103 }
104
105 /**
106 * @return Collection
107 */
108 public function getWeekDayList()
109 {
110 return $this->weekDayList;
111 }
112
113 /**
114 * @param Collection $weekDayList
115 */
116 public function setWeekDayList(Collection $weekDayList)
117 {
118 $this->weekDayList = $weekDayList;
119 }
120
121 /**
122 * @return Collection
123 */
124 public function getServiceList()
125 {
126 return $this->serviceList;
127 }
128
129 /**
130 * @param Collection $serviceList
131 */
132 public function setServiceList(Collection $serviceList)
133 {
134 $this->serviceList = $serviceList;
135 }
136
137 /**
138 * @return Collection
139 */
140 public function getDayOffList()
141 {
142 return $this->dayOffList;
143 }
144
145 /**
146 * @param Collection $dayOffList
147 */
148 public function setDayOffList(Collection $dayOffList)
149 {
150 $this->dayOffList = $dayOffList;
151 }
152
153 /**
154 * @return Collection
155 */
156 public function getSpecialDayList()
157 {
158 return $this->specialDayList;
159 }
160
161 /**
162 * @param Collection $specialDayList
163 */
164 public function setSpecialDayList(Collection $specialDayList)
165 {
166 $this->specialDayList = $specialDayList;
167 }
168
169 /**
170 * @return Collection
171 */
172 public function getAppointmentList()
173 {
174 return $this->appointmentList;
175 }
176
177 /**
178 * @param Collection $appointmentList
179 */
180 public function setAppointmentList(Collection $appointmentList)
181 {
182 $this->appointmentList = $appointmentList;
183 }
184
185 /**
186 * @return Id
187 */
188 public function getLocationId()
189 {
190 return $this->locationId;
191 }
192
193 /**
194 * @param Id $locationId
195 */
196 public function setLocationId(Id $locationId)
197 {
198 $this->locationId = $locationId;
199 }
200
201 /**
202 * @return GoogleCalendar mixed
203 */
204 public function getGoogleCalendar()
205 {
206 return $this->googleCalendar;
207 }
208
209 /**
210 * @param mixed $googleCalendar
211 */
212 public function setGoogleCalendar($googleCalendar)
213 {
214 $this->googleCalendar = $googleCalendar;
215 }
216
217 /**
218 * @return OutlookCalendar mixed
219 */
220 public function getOutlookCalendar()
221 {
222 return $this->outlookCalendar;
223 }
224
225 /**
226 * @param mixed $outlookCalendar
227 */
228 public function setOutlookCalendar($outlookCalendar)
229 {
230 $this->outlookCalendar = $outlookCalendar;
231 }
232
233 /**
234 * @return Name
235 */
236 public function getTimeZone()
237 {
238 return $this->timeZone;
239 }
240
241 /**
242 * @param Name $timeZone
243 */
244 public function setTimeZone($timeZone)
245 {
246 $this->timeZone = $timeZone;
247 }
248
249 /**
250 * @return Description
251 */
252 public function getDescription()
253 {
254 return $this->description;
255 }
256
257 /**
258 * @param Description $description
259 */
260 public function setDescription($description)
261 {
262 $this->description = $description;
263 }
264
265 /**
266 * @return Id
267 */
268 public function getBadgeId()
269 {
270 return $this->badgeId;
271 }
272
273 /**
274 * @param Id $badgeId
275 */
276 public function setBadgeId(Id $badgeId)
277 {
278 $this->badgeId = $badgeId;
279 }
280
281 /**
282 * @return StripeConnect
283 */
284 public function getStripeConnect()
285 {
286 return $this->stripeConnect;
287 }
288
289 /**
290 * @param StripeConnect $stripeConnect
291 */
292 public function setStripeConnect($stripeConnect)
293 {
294 $this->stripeConnect = $stripeConnect;
295 }
296
297 /**
298 * @return AppleCalendarEmployeeConnect
299 */
300 public function getEmployeeAppleCalendar()
301 {
302 return $this->employeeAppleCalendar;
303 }
304
305 /**
306 * @param AppleCalendarEmployeeConnect $employeeAppleCalendar
307 */
308 public function setEmployeeAppleCalendar($employeeAppleCalendar)
309 {
310 $this->employeeAppleCalendar = $employeeAppleCalendar;
311 }
312
313 public function getShow()
314 {
315 return $this->show;
316 }
317
318 public function setShow(BooleanValueObject $show)
319 {
320 $this->show = $show;
321 }
322
323
324 /**
325 * Returns the Provider entity fields in an array form
326 */
327 public function toArray()
328 {
329 return array_merge(
330 parent::toArray(),
331 [
332 'phone' => $this->phone->getValue(),
333 'weekDayList' => $this->weekDayList->toArray(),
334 'serviceList' => $this->serviceList->toArray(),
335 'dayOffList' => $this->dayOffList->toArray(),
336 'specialDayList' => $this->specialDayList->toArray(),
337 'locationId' => $this->getLocationId() ? $this->getLocationId()->getValue() : null,
338 'googleCalendar' => $this->getGoogleCalendar() ? $this->getGoogleCalendar()->toArray() : null,
339 'outlookCalendar' => $this->getOutlookCalendar() ? $this->getOutlookCalendar()->toArray() : null,
340 'timeZone' => $this->getTimeZone() ? $this->getTimeZone()->getValue() : null,
341 'description' => $this->getDescription() ? $this->getDescription()->getValue() : null,
342 'badgeId' => $this->getBadgeId() ? $this->getBadgeId()->getValue() : null,
343 'stripeConnect' => $this->getStripeConnect() ? $this->getStripeConnect()->toArray() : null,
344 'employeeAppleCalendar' => $this->getEmployeeAppleCalendar() ? $this->getEmployeeAppleCalendar()->toArray() : null,
345 'show' => $this->getShow() ? $this->getShow()->getValue() : null,
346 ]
347 );
348 }
349 }
350