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\Blog;
22
24
29{
30 protected Container $DIC;
31 protected array $instance = [];
32
33 public function __construct(Container $DIC)
34 {
35 $this->DIC = $DIC;
36 }
37
38 public function data(): InternalDataService
39 {
40 return $this->instance["data"] ??
41 $this->instance["data"] = new InternalDataService();
42 }
43
44 public function repo(): InternalRepoService
45 {
46 return $this->instance["repo"] ??
47 $this->instance["repo"] = new InternalRepoService(
48 $this->data(),
49 $this->DIC->database()
50 );
51 }
52
53 public function domain(): InternalDomainService
54 {
55 return $this->instance["domain"] ??
56 $this->instance["domain"] = new InternalDomainService(
57 $this->DIC,
58 $this->repo(),
59 $this->data()
60 );
61 }
62
63 public function gui(): InternalGUIService
64 {
65 return $this->instance["gui"] ??
66 $this->instance["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