ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\BackgroundTasks\Dependencies\DependencyMap\BaseDependencyMap Class Reference
+ Inheritance diagram for ILIAS\BackgroundTasks\Dependencies\DependencyMap\BaseDependencyMap:
+ Collaboration diagram for ILIAS\BackgroundTasks\Dependencies\DependencyMap\BaseDependencyMap:

Public Member Functions

 __construct ()
 
- Public Member Functions inherited from ILIAS\BackgroundTasks\Dependencies\DependencyMap\EmptyDependencyMap
 getDependencyWith (Container $DIC, string $fullyQualifiedDomainName, string $for, callable $map)
 
Parameters
Container$DICThe DIC to take the dependencies from.
string$fullyQualifiedDomainNameWhat domain name is requested?
callable$map(DIC $DIC, string $fullyQualifiedDomainName, string $for) => mixed|null
string$forWhat class is the dependency for? Also fully qualified domain name.
Returns
mixed
More...
 
 with (callable $map)
 Returns a new dependency map with the given mapping. More...
 
 getDependency (Container $DIC, string $fullyQualifiedDomainName, string $for)
 
Parameters
Container$DICThe DIC to take the dependencies from.
string$fullyQualifiedDomainNameWhat domain name is requested?
string$forWhat class is the dependency for? Also fully qualified domain name.
Returns
mixed
More...
 

Protected Member Functions

 resolveBaseDependencies (Container $DIC, $fullyQualifiedDomainName, $for)
 

Protected Attributes

array $map = []
 
- Protected Attributes inherited from ILIAS\BackgroundTasks\Dependencies\DependencyMap\EmptyDependencyMap
array $maps = []
 

Detailed Description

Definition at line 33 of file BaseDependencyMap.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\BackgroundTasks\Dependencies\DependencyMap\BaseDependencyMap::__construct ( )

Definition at line 37 of file BaseDependencyMap.php.

References $DIC, and ILIAS\BackgroundTasks\Dependencies\DependencyMap\BaseDependencyMap\resolveBaseDependencies().

38  {
39  $this->maps = [fn(Container $DIC, $fullyQualifiedDomainName, $for) => $this->resolveBaseDependencies($DIC, $fullyQualifiedDomainName, $for)];
40  }
resolveBaseDependencies(Container $DIC, $fullyQualifiedDomainName, $for)
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ resolveBaseDependencies()

ILIAS\BackgroundTasks\Dependencies\DependencyMap\BaseDependencyMap::resolveBaseDependencies ( Container  $DIC,
  $fullyQualifiedDomainName,
  $for 
)
protected

Definition at line 42 of file BaseDependencyMap.php.

References ILIAS\DI\Container\access(), ILIAS\DI\Container\backgroundTasks(), ILIAS\DI\Container\ctrl(), ILIAS\DI\Container\database(), ILIAS\DI\Container\language(), ILIAS\DI\Container\logger(), null, ILIAS\DI\Container\rbac(), ILIAS\DI\Container\repositoryTree(), ILIAS\DI\Container\settings(), ILIAS\DI\Container\tabs(), ILIAS\DI\Container\toolbar(), ILIAS\DI\Container\ui(), and ILIAS\DI\Container\user().

Referenced by ILIAS\BackgroundTasks\Dependencies\DependencyMap\BaseDependencyMap\__construct().

43  {
44  // wow, why a switch statement and not an array?
45  // because we don't really want type unsafe array access on $DIC.
46  switch ($fullyQualifiedDomainName) {
47  case \ilDBInterface::class:
48  return $DIC->database();
49  case \ilRbacAdmin::class:
50  return $DIC->rbac()->admin();
51  case \ilRbacReview::class:
52  return $DIC->rbac()->review();
53  case \ilRbacSystem::class:
54  return $DIC->rbac()->system();
55  case \ilAccessHandler::class:
56  return $DIC->access();
57  case \ilCtrl::class:
58  return $DIC->ctrl();
59  case \ilObjUser::class:
60  return $DIC->user();
61  case \ilTree::class:
62  return $DIC->repositoryTree();
63  case \ilLanguage::class:
64  return $DIC->language();
65  case \ilLoggerFactory::class:
66  return $DIC["ilLoggerFactory"];
67  case \ilLogger::class:
68  return $DIC->logger()->root();
69  case \ilToolbarGUI::class:
70  return $DIC->toolbar();
71  case \ilTabsGUI::class:
72  return $DIC->tabs();
73  case Injector::class:
74  return $DIC->backgroundTasks()->injector();
75  case \ilSetting::class:
76  return $DIC->settings();
77  case Factory::class:
78  return $DIC->ui()->factory();
79  case Renderer::class:
80  return $DIC->ui()->renderer();
81  case \ilTemplate::class:
82  return $DIC->ui()->mainTemplate();
83  case Persistence::class:
84  return $DIC->backgroundTasks()->persistence();
85  case TaskFactory::class:
86  return $DIC->backgroundTasks()->taskFactory();
87  }
88  return null;
89  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $map

array ILIAS\BackgroundTasks\Dependencies\DependencyMap\BaseDependencyMap::$map = []
protected

Definition at line 35 of file BaseDependencyMap.php.


The documentation for this class was generated from the following file: