ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Services.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
28 
29 class Services
30 {
32  protected StatusRepository $status_repository;
33 
34  protected GlobalContainer $dic;
35 
36  public function __construct(GlobalContainer $dic)
37  {
38  $this->dic = $dic;
39  }
40 
41  public function settings(): SettingsInterface
42  {
43  if (isset($this->settings)) {
44  return $this->settings;
45  }
46  return $this->settings = new Settings();
47  }
48 
49  public function statusRepository(): StatusRepository
50  {
51  if (isset($this->status_repository)) {
53  }
54  return $this->status_repository = new DatabaseRepository($this->dic->database());
55  }
56 }