PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.27
Booking for Appointments and Events Calendar – Amelia v1.2.27
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 / Services / Resource / BasicResourceService.php
ameliabooking / src / Domain / Services / Resource Last commit date
AbstractResourceService.php 1 year ago BasicResourceService.php 1 year ago
BasicResourceService.php
101 lines
1 <?php
2
3 namespace AmeliaBooking\Domain\Services\Resource;
4
5 use AmeliaBooking\Domain\Collection\Collection;
6 use AmeliaBooking\Domain\Common\Exceptions\InvalidArgumentException;
7 use AmeliaBooking\Domain\Entity\Bookable\Service\Service;
8 use AmeliaBooking\Domain\Services\Interval\IntervalService;
9 use AmeliaBooking\Domain\Services\Schedule\ScheduleService;
10
11 /**
12 * Class BasicResourceService
13 *
14 * @package AmeliaBooking\Domain\Services\Resource
15 */
16 class BasicResourceService extends AbstractResourceService
17 {
18 /**
19 * BasicResourceService constructor.
20 *
21 * @param IntervalService $intervalService
22 * @param ScheduleService $scheduleService
23 */
24 public function __construct(
25 $intervalService,
26 $scheduleService
27 ) {
28 $this->intervalService = $intervalService;
29
30 $this->scheduleService = $scheduleService;
31 }
32
33 /**
34 * set substitute resources instead of resources that are not shred between services/locations
35 *
36 * @param Collection $resources
37 * @param array $entitiesIds
38 *
39 * @return void
40 * @throws InvalidArgumentException
41 */
42 public function setNonSharedResources($resources, $entitiesIds)
43 {
44 }
45
46 /**
47 * get collection of resources for service
48 *
49 * @param Collection $resources
50 * @param int $serviceId
51 *
52 * @return Collection
53 * @throws InvalidArgumentException
54 */
55 public function getServiceResources($resources, $serviceId)
56 {
57 return new Collection();
58 }
59
60 /**
61 * get providers id values for resources
62 *
63 * @param Collection $resources
64 *
65 * @return array
66 */
67 public function getResourcesProvidersIds($resources)
68 {
69 return [];
70 }
71
72 /**
73 * set unavailable intervals (fake appointments) to providers in moments when resources are used up
74 * return intervals of resources with locations that are used up
75 *
76 * @param Collection $resources
77 * @param Collection $appointments
78 * @param Collection $allLocations
79 * @param Service $service
80 * @param Collection $providers
81 * @param int|null $locationId
82 * @param int|null $excludeAppointmentId
83 * @param int $personsCount
84 *
85 * @return array
86 * @throws InvalidArgumentException
87 */
88 public function manageResources(
89 $resources,
90 $appointments,
91 $allLocations,
92 $service,
93 $providers,
94 $locationId,
95 $excludeAppointmentId,
96 $personsCount
97 ) {
98 return [];
99 }
100 }
101