ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
class.InternalService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\LearningModule;
22
24
26{
27 protected array $instance = [];
28
29 public function __construct(protected Container $DIC)
30 {
31 }
32
33 public function data(): InternalDataService
34 {
35 return $this->instance["data"] ??= new InternalDataService();
36 }
37
38 public function repo(): InternalRepoService
39 {
40 return $this->instance["repo"] ??= new InternalRepoService(
41 $this->data(),
42 $this->DIC->database()
43 );
44 }
45
46 public function domain(): InternalDomainService
47 {
48 return $this->instance["domain"] ??= new InternalDomainService(
49 $this->DIC,
50 $this->repo(),
51 $this->data()
52 );
53 }
54
55 public function gui(): InternalGUIService
56 {
57 return $this->instance["gui"] ??= new InternalGUIService(
58 $this->DIC,
59 $this->data(),
60 $this->domain()
61 );
62 }
63}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Learning modules internal data service.
Learning modules internal repo service.
global $DIC
Definition: shib_login.php:26