ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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  {
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 }
dependsOnEngine()
Return the class name of the Engine that is required for this Machine to work.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct()
FlavourMachines must be able to be created without further dependencies.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
canHandleDefinition(FlavourDefinition $definition)
Check if a corresponding configuration can be processed by this Machine.
__construct(Container $dic, ilPlugin $plugin)
processStream(FileInformation $information, FileStream $stream, FlavourDefinition $for_definition)
load(string $id, ?string $can_handle_definition_id=null, string $depends_on_engine=NoEngine::class)
The base interface for all filesystem streams.
Definition: FileStream.php:31