ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
Scorm2004.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS;
22 
23 class Scorm2004 implements Component\Component
24 {
25  public function init(
26  array | \ArrayAccess &$define,
27  array | \ArrayAccess &$implement,
28  array | \ArrayAccess &$use,
29  array | \ArrayAccess &$contribute,
30  array | \ArrayAccess &$seek,
31  array | \ArrayAccess &$provide,
32  array | \ArrayAccess &$pull,
33  array | \ArrayAccess &$internal,
34  ): void {
35  $contribute[Component\Resource\PublicAsset::class] = fn() =>
36  new Component\Resource\Endpoint($this, "storeScorm2004.php");
37 
38  $contribute[Component\Resource\PublicAsset::class] = fn() =>
39  new Component\Resource\Endpoint($this, "storeScorm.php");
40 
41  $contribute[Component\Resource\PublicAsset::class] = static fn() => new class () implements Component\Resource\PublicAsset {
42  public function getSource(): string
43  {
44  return "components/ILIAS/Scorm2004/scripts";
45  }
46  public function getTarget(): string
47  {
48  return "components/ILIAS/Scorm2004/scripts";
49  }
50  };
51 
52  $contribute[Component\Resource\PublicAsset::class] = static fn() => new class () implements Component\Resource\PublicAsset {
53  public function getSource(): string
54  {
55  return "components/ILIAS/Scorm2004/templates/default/images";
56  }
57  public function getTarget(): string
58  {
59  return "components/ILIAS/Scorm2004/templates/default/images";
60  }
61  };
62 
63  $contribute[Component\Resource\PublicAsset::class] = static fn() => new class () implements Component\Resource\PublicAsset {
64  public function getSource(): string
65  {
66  return "components/ILIAS/Scorm2004/templates/default/images";
67  }
68  public function getTarget(): string
69  {
70  return "components/ILIAS/UI/resources/images/scorm2004";
71  }
72  };
73 
74  $contribute[Component\Resource\PublicAsset::class] = static fn() => new class () implements Component\Resource\PublicAsset {
75  public function getSource(): string
76  {
77  return "components/ILIAS/Scorm2004/templates/default/player.css";
78  }
79  public function getTarget(): string
80  {
81  return "components/ILIAS/Scorm2004/templates/default/player.css";
82  }
83  };
84  }
85 }
Interface Observer Contains several chained tasks and infos about them.
An endpoint is a PHP file that produces output via HTTP.
Definition: Endpoint.php:28
An public asset is a file or folder that should be served via the web.
Definition: PublicAsset.php:26
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: Scorm2004.php:25