ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.InternalRepoService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\BookingManager;
22 
31 
33 {
34  use RepoServiceBase;
35 
36  protected static array $instances = [];
37 
38  public function __construct(
39  protected InternalDataService $data,
40  protected \ilDBInterface $db
41  ) {
42  }
43 
45  {
46  return self::$instances["preferences"] ??= new \ilBookingPreferencesDBRepository(
47  $this->data,
48  $this->db
49  );
50  }
51 
53  {
54  return self::$instances["preferenceBasedBooking"] ??= new \ilBookingPrefBasedBookGatewayRepository(
55  $this->db
56  );
57  }
58 
59  public function reservationTable(): ReservationTableSessionRepository
60  {
61  return self::$instances["reservationTable"] ??= new ReservationTableSessionRepository();
62  }
63 
64  public function objects(): ObjectsDBRepository
65  {
66  return self::$instances["objects"] ??= new ObjectsDBRepository(
67  $this->irss(),
68  $this->db
69  );
70  }
71 
72  public function schedules(): SchedulesDBRepository
73  {
74  return self::$instances["schedules"] ??= new SchedulesDBRepository(
75  $this->db
76  );
77  }
78 
79  public function reservation(): ReservationDBRepository
80  {
81  return self::$instances["reservation"] ??= new ReservationDBRepository(
82  $this->db
83  );
84  }
85 
91  array $context_obj_ids
92  ): ReservationDBRepository {
93  return new ReservationDBRepository(
94  $this->db,
95  $context_obj_ids
96  );
97  }
98 
99  public function objectSelection(): SelectedObjectsDBRepository
100  {
101  return self::$instances["objectSelection"] ??= new SelectedObjectsDBRepository(
102  $this->db
103  );
104  }
105 
106  public function participants(): ParticipantsRepository
107  {
108  return self::$instances["participants"] ??= new ParticipantsRepository(
109  $this->db
110  );
111  }
112 
113  public function settings(): SettingsDBRepository
114  {
115  return self::$instances["settings"] ??= new SettingsDBRepository(
116  $this->db,
117  $this->data
118  );
119  }
120 
121 }
__construct(protected InternalDataService $data, protected \ilDBInterface $db)
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...
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...
reservationWithContextObjCache(array $context_obj_ids)
Get repo with reservation information preloaded for context obj ids.