ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\FileUpload\Handler\BasicHandlerResult Class Reference

Class BasicHandlerResult. More...

+ Inheritance diagram for ILIAS\FileUpload\Handler\BasicHandlerResult:
+ Collaboration diagram for ILIAS\FileUpload\Handler\BasicHandlerResult:

Public Member Functions

 __construct (private string $file_identification_key, private int $status, private string $file_identifier, private string $message)
 BasicHandlerResult constructor. More...
 
 getStatus ()
 @inheritDoc More...
 
 getFileIdentifier ()
 @inheritDoc More...
 
 jsonSerialize ()
 @inheritDoc More...
 
 getMessage ()
 @inheritDoc More...
 
 getStatus ()
 
 getFileIdentifier ()
 
 getMessage ()
 

Additional Inherited Members

- Data Fields inherited from ILIAS\FileUpload\Handler\HandlerResult
const STATUS_OK = 1
 
const STATUS_FAILED = 2
 
const STATUS_PARTIAL = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\FileUpload\Handler\BasicHandlerResult::__construct ( private string  $file_identification_key,
private int  $status,
private string  $file_identifier,
private string  $message 
)

BasicHandlerResult constructor.

Definition at line 33 of file BasicHandlerResult.php.

34 {
35 }

Member Function Documentation

◆ getFileIdentifier()

ILIAS\FileUpload\Handler\BasicHandlerResult::getFileIdentifier ( )

@inheritDoc

Implements ILIAS\FileUpload\Handler\HandlerResult.

Definition at line 50 of file BasicHandlerResult.php.

50 : string
51 {
52 return $this->file_identifier;
53 }

◆ getMessage()

ILIAS\FileUpload\Handler\BasicHandlerResult::getMessage ( )

@inheritDoc

Implements ILIAS\FileUpload\Handler\HandlerResult.

Definition at line 74 of file BasicHandlerResult.php.

74 : string
75 {
76 return $this->message;
77 }
$message
Definition: xapiexit.php:31

References $message.

◆ getStatus()

ILIAS\FileUpload\Handler\BasicHandlerResult::getStatus ( )

@inheritDoc

Implements ILIAS\FileUpload\Handler\HandlerResult.

Definition at line 41 of file BasicHandlerResult.php.

41 : int
42 {
43 return $this->status;
44 }

◆ jsonSerialize()

ILIAS\FileUpload\Handler\BasicHandlerResult::jsonSerialize ( )
final

@inheritDoc

Definition at line 59 of file BasicHandlerResult.php.

59 : array
60 {
61 $str = $this->file_identification_key ?? UploadHandler::DEFAULT_FILE_ID_PARAMETER;
62
63 return [
64 'status' => $this->status,
65 'message' => $this->message,
66 $str => $this->file_identifier,
67 ];
68 }

References $message, and ILIAS\UI\Component\Input\Field\UploadHandler\DEFAULT_FILE_ID_PARAMETER.


The documentation for this class was generated from the following file: