ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
DummyMachine.php
Go to the documentation of this file.
1<?php
2
20
27
32{
33 private string $depends_on_engine = NoEngine::class;
34 private string $id = self::class;
35 private ?string $can_handle_definition_id = null;
36
37 public function load(
38 string $id,
39 ?string $can_handle_definition_id = null,
40 string $depends_on_engine = NoEngine::class
41 ): void {
42 $this->id = $id;
43 $this->depends_on_engine = $depends_on_engine;
44 $this->can_handle_definition_id = $can_handle_definition_id;
45 }
46
47 public function __construct()
48 {
50 }
51
52 public function getId(): string
53 {
54 return $this->id;
55 }
56
57 public function canHandleDefinition(FlavourDefinition $definition): bool
58 {
59 if ($this->can_handle_definition_id === null) {
60 return true;
61 }
62 return $this->can_handle_definition_id === $definition->getId();
63 }
64
65 public function dependsOnEngine(): ?string
66 {
67 return $this->depends_on_engine;
68 }
69
70
71 public function processStream(
72 FileInformation $information,
73 FileStream $stream,
74 FlavourDefinition $for_definition
75 ): \Generator {
76 yield new NonStoreableResult($for_definition, $stream);
77 }
78}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
dependsOnEngine()
Return the class name of the Engine that is required for this Machine to work.
canHandleDefinition(FlavourDefinition $definition)
Check if a corresponding configuration can be processed by this Machine.
load(string $id, ?string $can_handle_definition_id=null, string $depends_on_engine=NoEngine::class)
__construct()
FlavourMachines must be able to be created without further dependencies.
processStream(FileInformation $information, FileStream $stream, FlavourDefinition $for_definition)
The base interface for all filesystem streams.
Definition: FileStream.php:32
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...