19declare(strict_types=1);
38 return "flavour_data";
48 foreach ($finder->getMatchingClassNames(FlavourMachine::class) as $machine_name) {
50 $machine =
new $machine_name();
51 $machine_id = $machine->getId();
53 if ($machine_name === $machine_id) {
54 throw new LogicException(
55 "PLEASE beware that class-related magic constants are not recommended. Altering the implementation-name may result in lost flavours."
59 if (64 < strlen($machine_id)) {
60 throw new LogicException(
"ID of machine '$machine_name' exceeds 64 characters.");
63 if (isset($machines[$machine_id]) && $machines[$machine_id] !== $machine_name) {
64 throw new LogicException(
65 "Machine '$default_machine_ids[$machine_id]' and '$machine_name' implement the same ID ($machine_id)."
69 $machines[$machine_id] = $machine_name;
74 foreach ($finder->getMatchingClassNames(FlavourDefinition::class) as $definition_name) {
79 $reflection =
new ReflectionClass($definition_name);
80 $definition = $reflection->newInstanceWithoutConstructor();
81 $definition_id = $definition->getId();
82 }
catch (ReflectionException) {
87 if ($definition_name === $definition_id) {
88 throw new LogicException(
89 "PLEASE beware that class-related magic constants are not recommended. Altering the implementation-name may result in lost flavours."
93 if (64 < strlen((
string) $definition_id)) {
94 throw new LogicException(
"ID of definition '$definition_name' exceeds 64 characters.");
97 if (isset($definitions[$definition_id]) && $definitions[$definition_id] !== $definition_name) {
98 throw new LogicException(
99 "Definition '$definitions[$definition_id]' and '$definition_name' implement the same ID ($definition_id)."
103 $definitions[$definition_id] = $definition_name;
107 'machines' => $machines,
108 'definitions' => $definitions
This is an objective to build some artifact.
build()
Build the artifact based.
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...