ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.InternalDomainService.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 namespace ILIAS\Notes;
22 
25 
30 {
32 
35  protected array $instances = [];
36 
37  public function __construct(
39  InternalRepoService $repo_service,
40  InternalDataService $data_service
41  ) {
42  $this->repo_service = $repo_service;
43  $this->data_service = $data_service;
44  $this->initDomainServices($DIC);
45  }
46 
47  public function noteAccess(): AccessManager
48  {
49  return $this->instances[AccessManager::class] = $this->instances[AccessManager::class] ?? new AccessManager(
50  $this->data_service,
51  $this->repo_service,
52  $this
53  );
54  }
55 
56  public function notes(): NotesManager
57  {
58  return $this->instances[NotesManager::class] = $this->instances[NotesManager::class] ?? new NotesManager(
59  $this->data_service,
60  $this->repo_service,
61  $this
62  );
63  }
64 
66  {
67  return $this->instances[NotificationsManager::class] = $this->instances[NotificationsManager::class] ?? new NotificationsManager(
68  $this->data_service,
69  $this->repo_service,
70  $this
71  );
72  }
73 }
initDomainServices(\ILIAS\DI\Container $DIC)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $DIC, InternalRepoService $repo_service, InternalDataService $data_service)