ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ILIAS\LegalDocuments\Internal Class Reference
+ Collaboration diagram for ILIAS\LegalDocuments\Internal:

Public Member Functions

 __construct (Closure $create_provide, Closure $create_wiring, ?array $consumer_classes=null)
 
 all (string $name)
 
 get (string $name, string $key)
 

Private Attributes

readonly array $map
 

Detailed Description

Definition at line 26 of file Internal.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\Internal::__construct ( Closure  $create_provide,
Closure  $create_wiring,
?array  $consumer_classes = null 
)
Parameters
Closure(string)Provide $create_provide
Closure(string)Wiring $create_wiring
null|list<class-string>$consumer_classes

Definition at line 36 of file Internal.php.

References ILIAS\Setup\Artifact\BuildArtifactObjective\PATH().

37  {
38  $lens = fn($consumer) => $consumer->uses($create_wiring($consumer->id()), new LazyProvide(fn() => $create_provide($consumer->id())));
39  $this->map = array_reduce(
40  $consumer_classes ?? require ConsumerObjective::PATH(),
41  fn($map, $consumer) => $map->append($lens(new $consumer())->map()),
42  new Map()
43  )->value();
44  }
+ Here is the call graph for this function:

Member Function Documentation

◆ all()

ILIAS\LegalDocuments\Internal::all ( string  $name)

Definition at line 46 of file Internal.php.

46  : array
47  {
48  return $this->map[$name] ?? [];
49  }

◆ get()

ILIAS\LegalDocuments\Internal::get ( string  $name,
string  $key 
)

Definition at line 51 of file Internal.php.

References null.

52  {
53  return $this->map[$name][$key] ?? null;
54  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

Field Documentation

◆ $map

readonly array ILIAS\LegalDocuments\Internal::$map
private

Definition at line 29 of file Internal.php.


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