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