ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
DummyMachine.php
Go to the documentation of this file.
1 <?php
2 
20 
28 
33 {
34  private string $depends_on_engine = NoEngine::class;
35  private string $id = self::class;
36  private ?string $can_handle_definition_id = null;
37 
38  public function load(
39  string $id,
40  ?string $can_handle_definition_id = null,
41  string $depends_on_engine = NoEngine::class
42  ): void {
43  $this->id = $id;
44  $this->depends_on_engine = $depends_on_engine;
45  $this->can_handle_definition_id = $can_handle_definition_id;
46  }
47 
48  public function __construct()
49  {
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.
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