ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
FilenameOverridePreProcessor.php
Go to the documentation of this file.
1
<?php
2
3
namespace
ILIAS\FileUpload\Processor
;
4
5
use
ILIAS\Filesystem\Stream\FileStream
;
6
use
ILIAS\FileUpload\DTO\Metadata
;
7
use
ILIAS\FileUpload\DTO\ProcessingStatus
;
8
18
final
class
FilenameOverridePreProcessor
implements
PreProcessor
19
{
20
24
private
$filename
;
25
26
32
public
function
__construct
(
$filename
)
33
{
34
$this->filename =
$filename
;
35
}
36
37
41
public
function
process
(
FileStream
$stream
,
Metadata
$metadata
)
42
{
43
$metadata->
setFilename
($this->filename);
44
45
return
new
ProcessingStatus
(
ProcessingStatus::OK
,
'Filename changed'
);
46
}
47
}
ILIAS\FileUpload\Processor\PreProcessor
Class PreProcessor.
Definition:
PreProcessor.php:22
ILIAS\FileUpload\DTO\ProcessingStatus
Class ProcessingStatus.
Definition:
ProcessingStatus.php:20
ILIAS\FileUpload\Processor\FilenameOverridePreProcessor\process
process(FileStream $stream, Metadata $metadata)
Definition:
FilenameOverridePreProcessor.php:41
$metadata
$metadata['__DYNAMIC:1__']
Definition:
adfs-idp-hosted.php:3
GuzzleHttp\Psr7\$stream
$stream
PHP stream implementation.
Definition:
MessageTrait.php:21
ProcessingStatus
ILIAS\FileUpload\Processor\FilenameOverridePreProcessor\$filename
$filename
Definition:
FilenameOverridePreProcessor.php:24
ILIAS\FileUpload\Processor
Definition:
BlacklistExtensionPreProcessor.php:3
ILIAS\FileUpload\DTO\Metadata
Class Metadata.
Definition:
Metadata.php:21
ILIAS\FileUpload\Processor\FilenameOverridePreProcessor
Class FilenameOverridePreProcessor.
Definition:
FilenameOverridePreProcessor.php:18
ILIAS\FileUpload\Processor\FilenameOverridePreProcessor\__construct
__construct($filename)
BlacklistExtensionPreProcessor constructor.
Definition:
FilenameOverridePreProcessor.php:32
Metadata
FileStream
ILIAS\FileUpload\DTO\Metadata\setFilename
setFilename($filename)
Overwrite the current filename.
Definition:
Metadata.php:87
ILIAS\Filesystem\Stream\FileStream
Interface FileStream.
Definition:
FileStream.php:20
ILIAS\FileUpload\DTO\ProcessingStatus\OK
const OK
Upload is ok.
Definition:
ProcessingStatus.php:26
src
FileUpload
Processor
FilenameOverridePreProcessor.php
Generated on Sat Jan 18 2025 19:01:42 for ILIAS by
1.8.13 (using
Doxyfile
)