ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.InternalDomainService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\BookingManager;
22
30
35{
36 use GlobalDICDomainServices;
37
38 protected static array $instances = [];
39 protected ?\ilLogger $book_log = null;
42
43 public function __construct(
47 ) {
48 $this->repo_service = $repo_service;
49 $this->data_service = $data_service;
50 $this->initDomainServices($DIC);
51 }
52
53 public function log(): \ilLogger
54 {
55 return self::$instances["book_log"] ??= $this->logger()->book();
56 }
57
58 public function preferences(
59 \ilObjBookingPool $pool
61 return self::$instances["preferences"][$pool->getId()] ??= new \ilBookingPreferencesManager(
62 $pool,
63 $this->repo_service->preferenceBasedBooking()
64 );
65 }
66
67 public function process(): BookingProcessManager
68 {
69 return self::$instances["process"] ??= new BookingProcessManager(
70 $this->data_service,
71 $this->repo_service,
72 $this
73 );
74 }
75
76 public function objects(int $pool_id): ObjectsManager
77 {
78 return self::$instances["objects"][$pool_id] ??= new ObjectsManager(
79 $this->data_service,
80 $this->repo_service,
81 $this,
84 $pool_id
85 );
86 }
87
88 public function schedules(int $pool_id): ScheduleManager
89 {
90 return self::$instances["schedules"][$pool_id] ??= new ScheduleManager(
91 $this->data_service,
92 $this->repo_service,
93 $this,
94 $pool_id
95 );
96 }
97
98 public function reservations(): Reservations\ReservationManager
99 {
100 return self::$instances["reservations"] ??= new Reservations\ReservationManager(
101 $this->data_service,
102 $this->repo_service,
103 $this
104 );
105 }
106
107 public function participants(): Participants\ParticipantsManager
108 {
109 return self::$instances["participants"] ??= new Participants\ParticipantsManager(
110 $this->data_service,
111 $this->repo_service,
112 $this
113 );
114 }
115
116 public function objectSelection(int $pool_id): BookingProcess\ObjectSelectionManager
117 {
118 return self::$instances["object_sel"][$pool_id] ??= new BookingProcess\ObjectSelectionManager(
119 $this->data_service,
120 $this->repo_service,
121 $this,
122 $pool_id
123 );
124 }
125
126 public function userEvent(): UserEvent
127 {
128 return self::$instances["user_event"] ??= new UserEvent($this);
129 }
130
132 {
133 return self::$instances["settings"] ??= new SettingsManager(
134 $this->data_service,
135 $this->repo_service,
136 $this
137 );
138 }
139
140 public function access(): Access\AccessManager
141 {
142 return new Access\AccessManager(
143 $this,
144 $this->DIC->access()
145 );
146 }
147
148}
Author: Alexander Killing killing@leifos.de
__construct(Container $DIC, InternalRepoService $repo_service, InternalDataService $data_service)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Component logger with individual log levels by component id.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initDomainServices(\ILIAS\DI\Container $DIC)
global $DIC
Definition: shib_login.php:26