PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.32
Booking for Appointments and Events Calendar – Amelia v1.2.32
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 / Infrastructure / ContainerConfig / application.services.php
ameliabooking / src / Infrastructure / ContainerConfig Last commit date
application.services.php 1 year ago command.bus.php 2 years ago container.php 1 year ago domain.event.bus.php 1 year ago domain.services.php 1 year ago infrastructure.services.php 10 months ago infrastructure.user.php 1 year ago repositories.php 1 year ago request.php 1 year ago
application.services.php
555 lines
1 <?php
2
3 /**
4 * Assembling application services:
5 * Instantiating application services and injecting the Infrastructure layer implementations
6 */
7
8 use AmeliaBooking\Application\Services\Bookable\AbstractPackageApplicationService;
9 use AmeliaBooking\Application\Services\Bookable\BookableApplicationService;
10 use AmeliaBooking\Application\Services\Booking\BookingApplicationService;
11 use AmeliaBooking\Application\Services\Booking\AppointmentApplicationService;
12 use AmeliaBooking\Application\Services\Booking\EventApplicationService;
13 use AmeliaBooking\Application\Services\Cache\CacheApplicationService;
14 use AmeliaBooking\Application\Services\Entity\EntityApplicationService;
15 use AmeliaBooking\Application\Services\Gallery\GalleryApplicationService;
16 use AmeliaBooking\Application\Services\Payment\PaymentApplicationService;
17 use AmeliaBooking\Application\Services\Reservation\ReservationService;
18 use AmeliaBooking\Application\Services\TimeSlot\TimeSlotService;
19 use AmeliaBooking\Application\Services\User\CustomerApplicationService;
20 use AmeliaBooking\Application\Services\User\ProviderApplicationService;
21 use AmeliaBooking\Application\Services\User\UserApplicationService;
22 use AmeliaBooking\Domain\Entity\Booking\Reservation;
23 use AmeliaBooking\Infrastructure\Common\Container;
24
25 defined('ABSPATH') or die('No script kiddies please!');
26
27 /**
28 * Entities service
29 *
30 * @param Container $c
31 *
32 * @return EntityApplicationService
33 */
34 $entries['application.entity.service'] = function ($c) {
35 return new AmeliaBooking\Application\Services\Entity\EntityApplicationService($c);
36 };
37
38 /**
39 * Customer service
40 *
41 * @param Container $c
42 *
43 * @return UserApplicationService
44 */
45 $entries['application.user.service'] = function ($c) {
46 return new AmeliaBooking\Application\Services\User\UserApplicationService($c);
47 };
48
49 /**
50 * API User Application service
51 *
52 * @param $c
53 *
54 * @return AmeliaBooking\Application\Services\User\UserApplicationService
55 */
56 $entries['application.api.user.service'] = function ($c) {
57 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getApiService(
58 $c
59 );
60 };
61
62 /**
63 * Provider service
64 *
65 * @param Container $c
66 *
67 * @return ProviderApplicationService
68 */
69 $entries['application.user.provider.service'] = function ($c) {
70 return new AmeliaBooking\Application\Services\User\ProviderApplicationService($c);
71 };
72
73 /**
74 * Customer service
75 *
76 * @param Container $c
77 *
78 * @return CustomerApplicationService
79 */
80 $entries['application.user.customer.service'] = function ($c) {
81 return new AmeliaBooking\Application\Services\User\CustomerApplicationService($c);
82 };
83
84 /**
85 * Current Location Service
86 *
87 * @return AmeliaBooking\Application\Services\Location\AbstractCurrentLocation
88 */
89 $entries['application.currentLocation.service'] = function () {
90 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getCurrentLocationService();
91 };
92
93 /**
94 * Deposit Service
95 *
96 * @param Container $c
97 *
98 * @return AmeliaBooking\Application\Services\Deposit\AbstractDepositApplicationService
99 */
100 $entries['application.deposit.service'] = function ($c) {
101 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getDepositService($c);
102 };
103
104 /**
105 * Extra Service
106 *
107 * @param Container $c
108 *
109 * @return AmeliaBooking\Application\Services\Extra\AbstractExtraApplicationService
110 */
111 $entries['application.extra.service'] = function ($c) {
112 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getExtraService($c);
113 };
114
115 /**
116 * Appointment service
117 *
118 * @param Container $c
119 *
120 * @return AppointmentApplicationService
121 */
122 $entries['application.booking.appointment.service'] = function ($c) {
123 return new AmeliaBooking\Application\Services\Booking\AppointmentApplicationService($c);
124 };
125
126 /**
127 * Event service
128 *
129 * @param Container $c
130 *
131 * @return EventApplicationService
132 */
133 $entries['application.booking.event.service'] = function ($c) {
134 return new AmeliaBooking\Application\Services\Booking\EventApplicationService($c);
135 };
136
137 /**
138 * Reservation service
139 *
140 * @param Container $c
141 *
142 * @return ReservationService
143 */
144 $entries['application.reservation.service'] = function ($c) {
145 return new AmeliaBooking\Application\Services\Reservation\ReservationService($c);
146 };
147
148 /**
149 * Reservation
150 *
151 * @param bool $validate
152 *
153 * @return Reservation
154 */
155 $entries['application.reservation'] = function () {
156 return new AmeliaBooking\Domain\Entity\Booking\Reservation();
157 };
158
159 /**
160 * Appointment Reservation service
161 *
162 * @param Container $c
163 *
164 * @return AmeliaBooking\Application\Services\Reservation\AppointmentReservationService
165 */
166 $entries['application.reservation.appointment.service'] = function ($c) {
167 return new AmeliaBooking\Application\Services\Reservation\AppointmentReservationService($c);
168 };
169
170 /**
171 * Package Reservation service
172 *
173 * @param Container $c
174 *
175 * @return AmeliaBooking\Application\Services\Reservation\PackageReservationService
176 */
177 $entries['application.reservation.package.service'] = function ($c) {
178 return new AmeliaBooking\Application\Services\Reservation\PackageReservationService($c);
179 };
180
181 /**
182 * Event Reservation service
183 *
184 * @param Container $c
185 *
186 * @return AmeliaBooking\Application\Services\Reservation\EventReservationService
187 */
188 $entries['application.reservation.event.service'] = function ($c) {
189 return new AmeliaBooking\Application\Services\Reservation\EventReservationService($c);
190 };
191
192 /**
193 * Booking service
194 *
195 * @param Container $c
196 *
197 * @return BookingApplicationService
198 */
199 $entries['application.booking.booking.service'] = function ($c) {
200 return new AmeliaBooking\Application\Services\Booking\BookingApplicationService($c);
201 };
202
203 /**
204 * Bookable service
205 *
206 * @param Container $c
207 *
208 * @return BookableApplicationService
209 */
210 $entries['application.bookable.service'] = function ($c) {
211 return new AmeliaBooking\Application\Services\Bookable\BookableApplicationService($c);
212 };
213
214 /**
215 * Bookable package
216 *
217 * @param Container $c
218 *
219 * @return AbstractPackageApplicationService
220 */
221 $entries['application.bookable.package'] = function ($c) {
222 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getPackageService($c);
223 };
224
225 /**
226 * Resource service
227 *
228 * @param Container $c
229 *
230 * @return AmeliaBooking\Application\Services\Resource\AbstractResourceApplicationService
231 */
232 $entries['application.resource.service'] = function ($c) {
233 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getResourceService($c);
234 };
235
236 /**
237 * Gallery service
238 *
239 * @param Container $c
240 *
241 * @return GalleryApplicationService
242 */
243 $entries['application.gallery.service'] = function ($c) {
244 return new AmeliaBooking\Application\Services\Gallery\GalleryApplicationService($c);
245 };
246
247 /**
248 * Calendar service
249 *
250 * @param Container $c
251 *
252 * @return TimeSlotService
253 */
254 $entries['application.timeSlot.service'] = function ($c) {
255 return new AmeliaBooking\Application\Services\TimeSlot\TimeSlotService($c);
256 };
257
258 /**
259 * Cache service
260 *
261 * @param Container $c
262 *
263 * @return CacheApplicationService
264 */
265 $entries['application.cache.service'] = function ($c) {
266 return new AmeliaBooking\Application\Services\Cache\CacheApplicationService($c);
267 };
268
269 /**
270 * Tax service
271 *
272 * @param Container $c
273 *
274 * @return AmeliaBooking\Application\Services\Tax\AbstractTaxApplicationService
275 */
276 $entries['application.tax.service'] = function ($c) {
277 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getTaxService($c);
278 };
279
280 /**
281 * Coupon service
282 *
283 * @param Container $c
284 *
285 * @return AmeliaBooking\Application\Services\Coupon\AbstractCouponApplicationService
286 */
287 $entries['application.coupon.service'] = function ($c) {
288 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getCouponService($c);
289 };
290
291 /**
292 * Location Service
293 *
294 * @param Container $c
295 *
296 * @return AmeliaBooking\Application\Services\Location\AbstractLocationApplicationService
297 */
298 $entries['application.location.service'] = function ($c) {
299 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getLocationService($c);
300 };
301
302 /**
303 * Notification Service
304 *
305 * @param Container $c
306 *
307 * @return AmeliaBooking\Application\Services\Notification\ApplicationNotificationService
308 */
309 $entries['application.notification.service'] = function ($c) {
310 return new AmeliaBooking\Application\Services\Notification\ApplicationNotificationService($c);
311 };
312
313 /**
314 * Appointment Notification Service
315 *
316 * @param Container $c
317 *
318 * @return AmeliaBooking\Application\Services\Notification\AppointmentNotificationService
319 */
320 $entries['application.notification.appointment.service'] = function ($c) {
321 return new AmeliaBooking\Application\Services\Notification\AppointmentNotificationService($c);
322 };
323
324 /**
325 * Email Notification Service
326 *
327 * @param Container $c
328 *
329 * @return \AmeliaBooking\Application\Services\Notification\EmailNotificationService
330 */
331 $entries['application.emailNotification.service'] = function ($c) {
332 return new AmeliaBooking\Application\Services\Notification\EmailNotificationService($c, 'email');
333 };
334
335 /**
336 * Notification Helper Service
337 *
338 * @param Container $c
339 *
340 * @return \AmeliaBooking\Application\Services\Notification\NotificationHelperService
341 */
342 $entries['application.notificationHelper.service'] = function ($c) {
343 return new AmeliaBooking\Application\Services\Notification\NotificationHelperService($c);
344 };
345
346 /**
347 * SMS Notification Service
348 *
349 * @param Container $c
350 *
351 * @return \AmeliaBooking\Application\Services\Notification\SMSNotificationService
352 */
353 $entries['application.smsNotification.service'] = function ($c) {
354 return new AmeliaBooking\Application\Services\Notification\SMSNotificationService($c, 'sms');
355 };
356
357
358 /**
359 * WhatsApp Notification Service
360 *
361 * @param Container $c
362 *
363 * @return AmeliaBooking\Application\Services\Notification\AbstractWhatsAppNotificationService
364 */
365 $entries['application.whatsAppNotification.service'] = function ($c) {
366 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getWhatsAppNotificationService($c);
367 };
368
369 /**
370 * Appointment Notification Service
371 *
372 * @param Container $c
373 *
374 * @return \AmeliaBooking\Application\Services\Placeholder\AppointmentPlaceholderService
375 */
376 $entries['application.placeholder.appointment.service'] = function ($c) {
377 return new AmeliaBooking\Application\Services\Placeholder\AppointmentPlaceholderService($c);
378 };
379
380 /**
381 * Appointments Notification Service
382 *
383 * @param Container $c
384 *
385 * @return \AmeliaBooking\Application\Services\Placeholder\AppointmentsPlaceholderService
386 */
387 $entries['application.placeholder.appointments.service'] = function ($c) {
388 return new AmeliaBooking\Application\Services\Placeholder\AppointmentsPlaceholderService($c);
389 };
390
391 /**
392 * Package Notification Service
393 *
394 * @param Container $c
395 *
396 * @return \AmeliaBooking\Application\Services\Placeholder\PackagePlaceholderService
397 */
398 $entries['application.placeholder.package.service'] = function ($c) {
399 return new AmeliaBooking\Application\Services\Placeholder\PackagePlaceholderService($c);
400 };
401
402 /**
403 * Event Notification Service
404 *
405 * @param Container $c
406 *
407 * @return \AmeliaBooking\Application\Services\Placeholder\EventPlaceholderService
408 */
409 $entries['application.placeholder.event.service'] = function ($c) {
410 return new AmeliaBooking\Application\Services\Placeholder\EventPlaceholderService($c);
411 };
412
413 /**
414 * Stats Service
415 *
416 * @param Container $c
417 *
418 * @return \AmeliaBooking\Application\Services\Stats\StatsService
419 */
420 $entries['application.stats.service'] = function ($c) {
421 return new AmeliaBooking\Application\Services\Stats\StatsService($c);
422 };
423
424 /**
425 * Helper Service
426 *
427 * @param Container $c
428 *
429 * @return \AmeliaBooking\Application\Services\Helper\HelperService
430 */
431 $entries['application.helper.service'] = function ($c) {
432 return new AmeliaBooking\Application\Services\Helper\HelperService($c);
433 };
434
435 /**
436 * Settings Service
437 *
438 * @param Container $c
439 *
440 * @return \AmeliaBooking\Application\Services\Settings\SettingsService
441 */
442 $entries['application.settings.service'] = function ($c) {
443 return new AmeliaBooking\Application\Services\Settings\SettingsService($c);
444 };
445
446 /**
447 * SMS API Service
448 *
449 * @param Container $c
450 *
451 * @return \AmeliaBooking\Application\Services\Notification\SMSAPIService
452 */
453 $entries['application.smsApi.service'] = function ($c) {
454 return new AmeliaBooking\Application\Services\Notification\SMSAPIService($c);
455 };
456
457 /**
458 * WhatsApp Service
459 *
460 * @param Container $c
461 *
462 * @return \AmeliaBooking\Application\Services\Notification\WhatsAppService
463 */
464 $entries['application.whatsApp.service'] = function ($c) {
465 return new AmeliaBooking\Application\Services\Notification\WhatsAppService($c);
466 };
467
468 /**
469 * Payment service
470 *
471 * @param Container $c
472 *
473 * @return PaymentApplicationService
474 */
475 $entries['application.payment.service'] = function ($c) {
476 return new AmeliaBooking\Application\Services\Payment\PaymentApplicationService($c);
477 };
478
479 /**
480 * Invoice service
481 *
482 * @param Container $c
483 *
484 * @return AmeliaBooking\Application\Services\Invoice\AbstractInvoiceApplicationService
485 */
486 $entries['application.invoice.service'] = function ($c) {
487 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getInvoiceService($c);
488 };
489
490 /**
491 * Custom Field Service
492 *
493 * @param Container $c
494 *
495 * @return AmeliaBooking\Application\Services\CustomField\AbstractCustomFieldApplicationService
496 */
497 $entries['application.customField.service'] = function ($c) {
498 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getCustomFieldService($c);
499 };
500
501 /**
502 * Web Hook Service
503 *
504 * @param Container $c
505 *
506 * @return AmeliaBooking\Application\Services\WebHook\AbstractWebHookApplicationService
507 */
508 $entries['application.webHook.service'] = function ($c) {
509 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getWebHookService($c);
510 };
511
512 /**
513 * Integration Service
514 *
515 * @param Container $c
516 *
517 * @return AmeliaBooking\Application\Services\Integration\ApplicationIntegrationService
518 */
519 $entries['application.integration.service'] = function ($c) {
520 return new AmeliaBooking\Application\Services\Integration\ApplicationIntegrationService($c);
521 };
522
523 /**
524 * Zoom Service
525 *
526 * @param Container $c
527 *
528 * @return AmeliaBooking\Application\Services\Zoom\AbstractZoomApplicationService
529 */
530 $entries['application.zoom.service'] = function ($c) {
531 return AmeliaBooking\Infrastructure\Licence\ApplicationService::getZoomService($c);
532 };
533
534 /**
535 * ICS File Service
536 *
537 * @param Container $c
538 *
539 * @return \AmeliaBooking\Application\Services\Booking\IcsApplicationService
540 */
541 $entries['application.ics.service'] = function ($c) {
542 return new AmeliaBooking\Application\Services\Booking\IcsApplicationService($c);
543 };
544
545 /**
546 * Stash Service
547 *
548 * @param Container $c
549 *
550 * @return AmeliaBooking\Application\Services\Stash\StashApplicationService
551 */
552 $entries['application.stash.service'] = function ($c) {
553 return new AmeliaBooking\Application\Services\Stash\StashApplicationService($c);
554 };
555