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\Taxonomy;
22
24
26{
27 protected Container $DIC;
28 protected static ?InternalDataService $data = null;
29 protected static ?InternalRepoService $repo = null;
30 protected static ?InternalDomainService $domain = null;
31 protected static ?InternalGUIService $gui = null;
32
33 public function __construct(Container $DIC)
34 {
35 $this->DIC = $DIC;
36 }
37
38 public function data(): InternalDataService
39 {
40 if (is_null(self::$data)) {
42 }
43 return self::$data;
44 }
45
46 public function repo(): InternalRepoService
47 {
48 if (is_null(self::$repo)) {
49 self::$repo = new InternalRepoService(
50 $this->data(),
51 $this->DIC->database()
52 );
53 }
54 return self::$repo;
55 }
56
57 public function domain(): InternalDomainService
58 {
59 if (is_null(self::$domain)) {
60 self::$domain = new InternalDomainService(
61 $this->DIC,
62 $this->repo(),
63 $this->data()
64 );
65 }
66 return self::$domain;
67 }
68
69 public function gui(): InternalGUIService
70 {
71 if (is_null(self::$gui)) {
72 self::$gui = new InternalGUIService(
73 $this->DIC,
74 $this->data(),
75 $this->domain()
76 );
77 }
78 return self::$gui;
79 }
80}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
static InternalDomainService $domain
static InternalRepoService $repo
static InternalDataService $data
static InternalGUIService $gui