ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
BasicHandlerResult.php
Go to the documentation of this file.
1 <?php
2 
4 
6 
13 {
14 
22  private $status;
30  private $message;
31 
32 
40  public function __construct(string $file_identification_key, int $status, string $file_identifier, string $message)
41  {
42  $this->file_identification_key = $file_identification_key;
43  $this->status = $status;
44  $this->file_identifier = $file_identifier;
45  $this->message = $message;
46  }
47 
48 
52  public function getStatus() : int
53  {
54  return $this->status;
55  }
56 
57 
61  public function getFileIdentifier() : string
62  {
64  }
65 
66 
70  final public function jsonSerialize()
71  {
72  $str = $this->file_identification_key ?? UploadHandler::DEFAULT_FILE_ID_PARAMETER;
73 
74  return [
75  'status' => $this->status,
76  'message' => $this->message,
77  $str => $this->file_identifier,
78  ];
79  }
80 
81 
85  public function getMessage() : string
86  {
87  return $this->message;
88  }
89 }
__construct(string $file_identification_key, int $status, string $file_identifier, string $message)
BasicHandlerResult constructor.