ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
PreProcessor.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 use Closure;
28 
30 {
34  public function __construct(private readonly Closure $fill)
35  {
36  }
37 
38  public function process(FileStream $stream, Metadata $metadata): ProcessingStatus
39  {
40  ($this->fill)($stream->getContents());
41 
42  return new ProcessingStatus(ProcessingStatus::OK, 'idontcare');
43  }
44 }
__construct(private readonly Closure $fill)
process(FileStream $stream, Metadata $metadata)
This method gets invoked by the file upload service to process the file with the help of the processo...
The base interface for all filesystem streams.
Definition: FileStream.php:31