ILIAS  trunk Revision v11.0_alpha-1702-gfd3ecb7f852
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
scenario3.php
Go to the documentation of this file.
1 <?php
2 
20 
22 
23 interface Service
24 {
25 }
26 
28 {
29 }
30 
31 class ComponentA implements Component
32 {
33  public function init(
34  array | \ArrayAccess &$define,
35  array | \ArrayAccess &$implement,
36  array | \ArrayAccess &$use,
37  array | \ArrayAccess &$contribute,
38  array | \ArrayAccess &$seek,
39  array | \ArrayAccess &$provide,
40  array | \ArrayAccess &$pull,
41  array | \ArrayAccess &$internal,
42  ): void {
43  $define[] = Service::class;
44  $implement[Service::class] = fn() => new ServiceImplementation();
45  }
46 }
47 
48 class ComponentB implements Component
49 {
50  public function init(
51  array | \ArrayAccess &$define,
52  array | \ArrayAccess &$implement,
53  array | \ArrayAccess &$use,
54  array | \ArrayAccess &$contribute,
55  array | \ArrayAccess &$seek,
56  array | \ArrayAccess &$provide,
57  array | \ArrayAccess &$pull,
58  array | \ArrayAccess &$internal,
59  ): void {
60  $internal["foo"] = fn() => $use[Service::class];
61  }
62 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: scenario3.php:19
init(array|\ArrayAccess &$define, array|\ArrayAccess &$implement, array|\ArrayAccess &$use, array|\ArrayAccess &$contribute, array|\ArrayAccess &$seek, array|\ArrayAccess &$provide, array|\ArrayAccess &$pull, array|\ArrayAccess &$internal,)
Definition: scenario3.php:50
init(array|\ArrayAccess &$define, array|\ArrayAccess &$implement, array|\ArrayAccess &$use, array|\ArrayAccess &$contribute, array|\ArrayAccess &$seek, array|\ArrayAccess &$provide, array|\ArrayAccess &$pull, array|\ArrayAccess &$internal,)
Definition: scenario3.php:33