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\Style\Content;
22 
24 
26 {
27  protected static array $instance = [];
28  protected Container $DIC;
29 
30  public function __construct(Container $DIC)
31  {
32  $this->DIC = $DIC;
33  }
34 
35  public function data(): InternalDataService
36  {
37  return self::$instance["data"] ??= new InternalDataService();
38  }
39 
40  public function repo(): InternalRepoService
41  {
42  return self::$instance["repo"] ??= new InternalRepoService(
43  $this->data(),
44  $this->DIC->database(),
45  $this->DIC->filesystem()->web(),
46  $this->DIC->upload()
47  );
48  }
49 
50  public function domain(): InternalDomainService
51  {
52  return self::$instance["domain"] ??= new InternalDomainService(
53  $this->DIC,
54  $this->repo(),
55  $this->data()
56  );
57  }
58 
59  public function gui(): InternalGUIService
60  {
61  return self::$instance["gui"] ??= new InternalGUIService(
62  $this->DIC,
63  $this->data(),
64  $this->domain()
65  );
66  }
67 }
Content style internal ui factory.
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35