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\Help;
22
24
26{
27 protected Container $DIC;
30
31 protected array $container = [];
32
33 public function __construct(Container $DIC)
34 {
35 $this->DIC = $DIC;
36 }
37
38 public function data(): InternalDataService
39 {
40 return $this->container["data"] ??
41 $this->container["data"] = new InternalDataService();
42 }
43
44 public function repo(): InternalRepoService
45 {
46 return $this->container["repo"] ??
47 $this->container["repo"] = new InternalRepoService(
48 $this->data(),
49 $this->DIC->database()
50 );
51 }
52
53 public function domain(): InternalDomainService
54 {
55 return $this->container["domain"] ??
56 $this->container["domain"] = new InternalDomainService(
57 $this->DIC,
58 $this->repo(),
59 $this->data()
60 );
61 }
62
63 public function gui(): InternalGUIService
64 {
65 return $this->container["gui"] ??
66 $this->container["gui"] = new InternalGUIService(
67 $this->DIC,
68 $this->data(),
69 $this->domain()
70 );
71 }
72}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...