ILIAS  trunk Revision v13.0_alpha-52-g21c366bbdd4
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 $this->DIC->copage()->internal()->domain()->page()
61 );
62 }
63
64 public function gui(): InternalGUIService
65 {
66 return $this->instance["gui"] ??
67 $this->instance["gui"] = new InternalGUIService(
68 $this->DIC,
69 $this->data(),
70 $this->domain()
71 );
72 }
73}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:38