ILIAS  release_8 Revision v8.24
UploadResult.php
Go to the documentation of this file.
1<?php
2
4
6use ILIAS\FileUpload\ScalarTypeCheckAware;
7
8/******************************************************************************
9 *
10 * This file is part of ILIAS, a powerful learning management system.
11 *
12 * ILIAS is licensed with the GPL-3.0, you should have received a copy
13 * of said license along with the source code.
14 *
15 * If this is not the case or you just want to try ILIAS, you'll find
16 * us at:
17 * https://www.ilias.de
18 * https://github.com/ILIAS-eLearning
19 *
20 *****************************************************************************/
33final class UploadResult
34{
35 use ScalarTypeCheckAware;
36 private string $name;
37 private int $size;
38 private string $mimeType;
41 private string $path;
42
43
58 {
59 $this->stringTypeCheck($name, "name");
60 $this->stringTypeCheck($mimeType, "mimeType");
61 $this->stringTypeCheck($path, "path");
62 $this->intTypeCheck($size, "size");
63
64 $this->name = $name;
65 $this->size = $size;
66 $this->mimeType = $mimeType;
67 $this->metaData = $metaData;
68 $this->status = $status;
69 $this->path = $path;
70 }
71
72
76 public function getName(): string
77 {
78 return $this->name;
79 }
80
81
85 public function getSize(): int
86 {
87 return $this->size;
88 }
89
90
94 public function getMimeType(): string
95 {
96 return $this->mimeType;
97 }
98
99
104 {
105 return $this->metaData;
106 }
107
108
112 public function getStatus(): ProcessingStatus
113 {
114 return $this->status;
115 }
116
117
118 public function isOK(): bool
119 {
120 return $this->status->getCode() === ProcessingStatus::OK;
121 }
122
123
127 public function getPath(): string
128 {
129 return $this->path;
130 }
131}
__construct(string $name, int $size, string $mimeType, ImmutableStringMap $metaData, ProcessingStatus $status, string $path)
UploadResult constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Metadata.php:3