ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
BaseDependencyMap.php
Go to the documentation of this file.
1 <?php
2 
4 
9 
18 {
19  protected $map;
20 
21 
22  public function __construct()
23  {
24  $this->maps = [[$this, 'resolveBaseDependencies']];
25  }
26 
27 
28  protected function resolveBaseDependencies(Container $DIC, $fullyQualifiedDomainName, $for)
29  {
30  // wow, why a switch statement and not an array?
31  // because we don't really want type unsafe array access on $DIC.
32  switch ($fullyQualifiedDomainName) {
33  case \ilDBInterface::class:
34  return $DIC->database();
35  case \ilDB::class:
36  return $DIC->database();
37  case \ilRbacAdmin::class:
38  return $DIC->rbac()->admin();
39  case \ilRbacReview::class:
40  return $DIC->rbac()->review();
41  case \ilRbacSystem::class:
42  return $DIC->rbac()->system();
43  case \ilAccessHandler::class:
44  return $DIC->access();
45  case \ilCtrl::class:
46  return $DIC->ctrl();
47  case \ilObjUser::class:
48  return $DIC->user();
49  case \ilTree::class:
50  return $DIC->repositoryTree();
51  case \ilLanguage::class:
52  return $DIC->language();
53  case \ilLoggerFactory::class:
54  return $DIC["ilLoggerFactory"];
55  case \ilLogger::class:
56  return $DIC->logger()->root();
57  case \ilToolbarGUI::class:
58  return $DIC->toolbar();
59  case \ilTabsGUI::class:
60  return $DIC->tabs();
61  case Injector::class:
62  return $DIC->backgroundTasks()->injector();
63  case \ilSetting::class:
64  return $DIC->settings();
65  case \ILIAS\UI\Factory::class:
66  return $DIC->ui()->factory();
67  case \ILIAS\UI\Renderer::class:
68  return $DIC->ui()->renderer();
69  case \ilTemplate::class:
70  return $DIC->ui()->mainTemplate();
71  case Persistence::class:
72  return $DIC->backgroundTasks()->persistence();
73  case TaskFactory::class:
74  return $DIC->backgroundTasks()->taskFactory();
75  case Container::class:
76  return $DIC;
77  }
78  }
79 }
logger()
Get interface to get interfaces to different loggers.
Definition: Container.php:93
user()
Get the current user.
Definition: Container.php:53
database()
Get interface to the Database.
Definition: Container.php:23
global $DIC
Definition: saml.php:7
tabs()
Get interface to the tabs.
Definition: Container.php:113
repositoryTree()
Get interface to the repository tree.
Definition: Container.php:73
resolveBaseDependencies(Container $DIC, $fullyQualifiedDomainName, $for)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:16
toolbar()
Get interface to the toolbar.
Definition: Container.php:103
language()
Get interface to the i18n service.
Definition: Container.php:83
rbac()
Get interface to get interfaces to all things rbac.
Definition: Container.php:33
access()
Get interface for access checks.
Definition: Container.php:63
ctrl()
Get the interface to the control structure.
Definition: Container.php:43
ui()
Get the interface to get services from UI framework.
Definition: Container.php:123
settings()
Get the interface to the settings.
Definition: Container.php:133