PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.20
Booking for Appointments and Events Calendar – Amelia v1.2.20
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 / AbstractResourceService.php
ameliabooking / src / Domain / Services / Resource Last commit date
AbstractResourceService.php 2 years ago BasicResourceService.php 2 years ago
AbstractResourceService.php
77 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
9 /**
10 * Class AbstractResourceService
11 *
12 * @package AmeliaBooking\Domain\Services\Resource
13 */
14 abstract class AbstractResourceService
15 {
16
17 /**
18 * set substitute resources instead of resources that are not shred between services/locations
19 *
20 * @param Collection $resources
21 * @param array $entitiesIds
22 *
23 * @return void
24 * @throws InvalidArgumentException
25 */
26 abstract public function setNonSharedResources($resources, $entitiesIds);
27
28 /**
29 * get collection of resources for service
30 *
31 * @param Collection $resources
32 * @param int $serviceId
33 *
34 * @return Collection
35 * @throws InvalidArgumentException
36 */
37 abstract public function getServiceResources($resources, $serviceId);
38
39 /**
40 * get providers id values for resources
41 *
42 * @param Collection $resources
43 *
44 * @return array
45 */
46 abstract public function getResourcesProvidersIds($resources);
47
48
49 /** @noinspection MoreThanThreeArgumentsInspection */
50 /**
51 * set unavailable intervals (fake appointments) to providers in moments when resources are used up
52 * return intervals of resources with locations that are used up
53 *
54 * @param Collection $resources
55 * @param Collection $appointments
56 * @param Collection $allLocations
57 * @param Service $service
58 * @param Collection $providers
59 * @param int|null $locationId
60 * @param int|null $excludeAppointmentId
61 * @param int $personsCount
62 *
63 * @return array
64 * @throws InvalidArgumentException
65 */
66 abstract public function manageResources(
67 $resources,
68 $appointments,
69 $allLocations,
70 $service,
71 $providers,
72 $locationId,
73 $excludeAppointmentId,
74 $personsCount
75 );
76 }
77