ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
scenario2.php
Go to the documentation of this file.
1 <?php
2 
20 
22 
23 interface Provides
24 {
25 }
26 
27 class ComponentAProvides implements Provides
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  $provide[Provides::class] = fn() => new ComponentAProvides();
44  }
45 }
46 
47 class ComponentB implements Component
48 {
49  public function init(
50  array | \ArrayAccess &$define,
51  array | \ArrayAccess &$implement,
52  array | \ArrayAccess &$use,
53  array | \ArrayAccess &$contribute,
54  array | \ArrayAccess &$seek,
55  array | \ArrayAccess &$provide,
56  array | \ArrayAccess &$pull,
57  array | \ArrayAccess &$internal,
58  ): void {
59  $internal["foo"] = fn() => $pull[Provides::class];
60  }
61 }
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: scenario2.php:33
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: scenario2.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: scenario2.php:49