ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.InternalService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace 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}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Repository internal service.
global $DIC
Definition: shib_login.php:26