ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilCtrlSecurityArtifactObjective.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21require_once __DIR__ . "/../../../../../../vendor/composer/vendor/autoload.php";
22
27
34{
35
36 public function getArtifactName(): string
37 {
38 return "ctrl_security";
39 }
40
41
45 public function build(): Artifact
46 {
47 $finder = new ImplementationOfInterfaceFinder();
48
49 $security_information = [];
50 foreach ($finder->getMatchingClassNames(ilCtrlSecurityInterface::class) as $class) {
51 try {
52 $reflection = new ReflectionClass($class);
53
55 $gui_object = $reflection->newInstanceWithoutConstructor();
56
57 $security_information[strtolower($class)] = [
58 ilCtrlStructureInterface::KEY_UNSAFE_COMMANDS => $gui_object->getUnsafeGetCommands(),
59 ilCtrlStructureInterface::KEY_SAFE_COMMANDS => $gui_object->getSafePostCommands(),
60 ];
61 } catch (ReflectionException $e) {
62 continue;
63 }
64 }
65
66 return new ArrayArtifact($security_information);
67 }
68}
An array as an artifact.
This is an objective to build some artifact.
Class ilCtrlSecurityArtifactObjective.
getArtifactName()
Get the filename where the builder wants to put its artifact.
An artifact is some file that is build on demand per installation and is not shipped with the ILIAS s...
Definition: Artifact.php:28