ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.InternalDomainService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Exercise;
22 
33 
35 {
37 
40  protected array $instance = [];
42 
43  public function __construct(
45  InternalDataService $data,
47  ) {
48  $this->data = $data;
49  $this->repo = $repo;
50  $this->initDomainServices($dic);
51  $this->assignment_service = new Assignment\DomainService(
52  $this,
53  $repo
54  );
55  }
56 
57  public function log(): \ilLogger
58  {
59  return $this->logger()->exc();
60  }
61 
62  public function object(int $ref_id): ObjectManager
63  {
64  return new ObjectManager($ref_id);
65  }
66 
67  public function assignment(): Assignment\DomainService
68  {
70  }
71 
72  public function submission(int $ass_id): SubmissionManager
73  {
74  return $this->instance["subm"][$ass_id] ??= new SubmissionManager(
75  $this->repo,
76  $this,
78  $ass_id
79  );
80  }
81 
82  public function peerReview(): DomainService
83  {
84  return $this->instance["peer_review"] ??= new DomainService(
85  $this->repo,
86  $this
87  );
88  }
89 
91  {
92  return $this->instance["notification"][$ref_id] ??= new NotificationManager(
93  $this,
94  $ref_id
95  );
96  }
97 
98  public function team(): TeamManager
99  {
100  return $this->instance["team"] ??= new TeamManager(
101  $this->repo,
102  $this,
104  );
105  }
106 
108  {
109  return $this->instance["idl"] ??= new IndividualDeadlineManager();
110  }
111 
112  public function exercise(
113  int $obj_id
114  ): ExerciseManager {
115  return $this->instance["exercise"][$obj_id] ??= new ExerciseManager(
116  $this->repo,
117  $this,
118  $obj_id
119  );
120  }
121 
122  public function exerciseSettings(
123  ): SettingsManager {
124  return $this->instance["settings"] ??= new SettingsManager(
125  $this->data,
126  $this->repo,
127  $this
128  );
129  }
130 
131  public function userEvent(): UserEvent
132  {
133  return new UserEvent(
134  $this->repo,
135  $this
136  );
137  }
138 
139 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initDomainServices(\ILIAS\DI\Container $DIC)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ref_id
Definition: ltiauth.php:65
Internal factory for data objects.
__construct(Container $dic, InternalDataService $data, InternalRepoService $repo)
$dic
Definition: result.php:31