ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.InternalService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\InfoScreen;
22 
24 
26 {
27  protected Container $DIC;
28  protected array $instance = [];
29 
30  public function __construct(Container $DIC)
31  {
32  $this->DIC = $DIC;
33  }
34 
35  public function data(): InternalDataService
36  {
37  return $this->instance["data"] ??
38  $this->instance["data"] = new InternalDataService();
39  }
40 
41  public function domain(): InternalDomainService
42  {
43  return $this->instance["domain"] ??
44  $this->instance["domain"] = new InternalDomainService(
45  $this->DIC,
46  $this->data()
47  );
48  }
49 
50  public function gui(): InternalGUIService
51  {
52  return $this->instance["gui"] ??
53  $this->instance["gui"] = new InternalGUIService(
54  $this->DIC,
55  $this->data(),
56  $this->domain()
57  );
58  }
59 }