ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
Internal.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\LegalDocuments
;
22
23
use Closure;
24
use
ILIAS\LegalDocuments\Setup\ConsumerObjective
;
25
26
class
Internal
27
{
29
private
readonly array
$map
;
30
36
public
function
__construct
(Closure $create_provide, Closure $create_wiring, ?array $consumer_classes =
null
)
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
}
45
46
public
function
all
(
string
$name): array
47
{
48
return
$this->map[$name] ?? [];
49
}
50
51
public
function
get
(
string
$name,
string
$key)
52
{
53
return
$this->map[$name][$key] ??
null
;
54
}
55
}
ILIAS\LegalDocuments\Internal
Definition:
Internal.php:27
ILIAS\LegalDocuments\Internal\$map
readonly array $map
Definition:
Internal.php:29
ILIAS\LegalDocuments\Internal\__construct
__construct(Closure $create_provide, Closure $create_wiring, ?array $consumer_classes=null)
Definition:
Internal.php:36
ILIAS\LegalDocuments\Internal\all
all(string $name)
Definition:
Internal.php:46
ILIAS\LegalDocuments\LazyProvide
Definition:
LazyProvide.php:31
ILIAS\LegalDocuments\Map
Definition:
Map.php:27
ILIAS\LegalDocuments\Setup\ConsumerObjective
Definition:
ConsumerObjective.php:28
ILIAS\Setup\Artifact\BuildArtifactObjective\PATH
static PATH()
Definition:
BuildArtifactObjective.php:40
ILIAS\LegalDocuments
Definition:
Administration.php:21
components
ILIAS
LegalDocuments
classes
Internal.php
Generated on Sat Oct 18 2025 23:03:20 for ILIAS by
1.9.4 (using
Doxyfile
)