ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.InternalDomainService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\BookingManager;
22 
30 
35 {
37 
38  protected static array $instances = [];
39  protected ?\ilLogger $book_log = null;
42 
43  public function __construct(
45  InternalRepoService $repo_service,
46  InternalDataService $data_service
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 
131  public function bookingSettings(): SettingsManager
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 }
initDomainServices(\ILIAS\DI\Container $DIC)
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...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Author: Alexander Killing killing@leifos.de
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:22
Component logger with individual log levels by component id.
__construct(Container $DIC, InternalRepoService $repo_service, InternalDataService $data_service)