ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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...
 
 getDependency (Container $DIC, string $fullyQualifiedDomainName, string $for)
 
 getDependencyWith (Container $DIC, string $fullyQualifiedDomainName, string $for, callable $map)
 

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.

38 {
39 $this->maps = [fn(Container $DIC, $fullyQualifiedDomainName, $for) => $this->resolveBaseDependencies($DIC, $fullyQualifiedDomainName, $for)];
40 }
resolveBaseDependencies(Container $DIC, $fullyQualifiedDomainName, $for)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
global $DIC
Definition: shib_login.php:26

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

+ 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.

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 }

References $DIC.

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

+ 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: