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\Glossary;
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 repo(): InternalRepoService
42 {
43 return $this->instance["repo"] ??
44 $this->instance["repo"] = new InternalRepoService(
45 $this->data(),
46 $this->DIC->database()
47 );
48 }
49
50 public function domain(): InternalDomainService
51 {
52 return $this->instance["domain"] ??
53 $this->instance["domain"] = new InternalDomainService(
54 $this->DIC,
55 $this->repo(),
56 $this->data()
57 );
58 }
59
60 public function gui(): InternalGUIService
61 {
62 return $this->instance["gui"] ??
63 $this->instance["gui"] = new InternalGUIService(
64 $this->DIC,
65 $this->data(),
66 $this->domain()
67 );
68
69 }
70}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36