ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\BackgroundTasks\Dependencies\DependencyMap\EmptyDependencyMap Class Reference
+ Inheritance diagram for ILIAS\BackgroundTasks\Dependencies\DependencyMap\EmptyDependencyMap:
+ Collaboration diagram for ILIAS\BackgroundTasks\Dependencies\DependencyMap\EmptyDependencyMap:

Public Member Functions

 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 Attributes

array $maps = []
 

Detailed Description

Definition at line 29 of file EmptyDependencyMap.php.

Member Function Documentation

◆ getDependency()

ILIAS\BackgroundTasks\Dependencies\DependencyMap\EmptyDependencyMap::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

Implements ILIAS\BackgroundTasks\Dependencies\DependencyMap\DependencyMap.

Definition at line 61 of file EmptyDependencyMap.php.

62 {
63 foreach ($this->maps as $map) {
64 $result = $map($DIC, $fullyQualifiedDomainName, $for);
65 if ($result) {
66 return $result;
67 }
68 }
69
70 throw new NoSuchServiceException("The requested service " . $fullyQualifiedDomainName
71 . " could not be resolved.");
72 }
global $DIC
Definition: shib_login.php:26

References $DIC.

Referenced by ILIAS\BackgroundTasks\Dependencies\DependencyMap\EmptyDependencyMap\getDependencyWith().

+ Here is the caller graph for this function:

◆ getDependencyWith()

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

Implements ILIAS\BackgroundTasks\Dependencies\DependencyMap\DependencyMap.

Definition at line 36 of file EmptyDependencyMap.php.

37 {
38 $result = $map($DIC, $fullyQualifiedDomainName, $for);
39 if ($result) {
40 return $result;
41 }
42 return $this->getDependency($DIC, $fullyQualifiedDomainName, $for);
43 }
getDependency(Container $DIC, string $fullyQualifiedDomainName, string $for)
mixed

References $DIC, and ILIAS\BackgroundTasks\Dependencies\DependencyMap\EmptyDependencyMap\getDependency().

+ Here is the call graph for this function:

◆ with()

ILIAS\BackgroundTasks\Dependencies\DependencyMap\EmptyDependencyMap::with ( callable  $map)

Returns a new dependency map with the given mapping.

The newer mapping always comes first!

Parameters
callable$map(Container $DIC, string $fullyQualifiedDomainName, string $for) => mixed|null

Definition at line 50 of file EmptyDependencyMap.php.

50 : DependencyMap
51 {
52 $dependency_map = new static();
53 $dependency_map->maps = array_merge([$map], $this->maps);
54
55 return $dependency_map;
56 }

Field Documentation

◆ $maps

array ILIAS\BackgroundTasks\Dependencies\DependencyMap\EmptyDependencyMap::$maps = []
protected

Definition at line 31 of file EmptyDependencyMap.php.


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