ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
ProcessingStatus.php
Go to the documentation of this file.
1
<?php
2
3
namespace
ILIAS\FileUpload\DTO
;
4
5
use
ILIAS\FileUpload\ScalarTypeCheckAware
;
6
20
final
class
ProcessingStatus
21
{
22
use
ScalarTypeCheckAware
;
26
const
OK
= 1;
30
const
REJECTED
= 2;
34
private
$code
;
38
private
$message
;
39
40
53
public
function
__construct
(
$code
, $reason)
54
{
55
$this->intTypeCheck(
$code
,
'code'
);
56
$this->stringTypeCheck($reason,
'reason'
);
57
58
if
(
$code
!== self::OK &&
$code
!== self::REJECTED) {
59
throw
new \InvalidArgumentException(
'Invalid upload status code received. The code must be OK or REJECTED.'
);
60
}
61
62
$this->code =
$code
;
63
$this->message = $reason;
64
}
65
66
71
public
function
getCode
()
72
{
73
return
$this->code
;
74
}
75
76
81
public
function
getMessage
()
82
{
83
return
$this->message
;
84
}
85
}
ILIAS\FileUpload\DTO\ProcessingStatus
Class ProcessingStatus.
Definition:
ProcessingStatus.php:20
ILIAS\FileUpload\DTO\ProcessingStatus\REJECTED
const REJECTED
Upload got rejected by a processor.
Definition:
ProcessingStatus.php:30
ILIAS\FileUpload\DTO\ProcessingStatus\$message
$message
Definition:
ProcessingStatus.php:38
ILIAS\FileUpload\DTO\ProcessingStatus\getCode
getCode()
Definition:
ProcessingStatus.php:71
ScalarTypeCheckAware
ScalarTypeCheckAware
ILIAS\FileUpload\DTO\ProcessingStatus\$code
$code
Definition:
ProcessingStatus.php:34
ILIAS\FileUpload\DTO\ProcessingStatus\getMessage
getMessage()
Definition:
ProcessingStatus.php:81
ILIAS\FileUpload\DTO\ProcessingStatus\__construct
__construct($code, $reason)
ProcessingStatus constructor.
Definition:
ProcessingStatus.php:53
ILIAS\FileUpload\DTO
Definition:
Metadata.php:3
ILIAS\FileUpload\DTO\ProcessingStatus\OK
const OK
Upload is ok.
Definition:
ProcessingStatus.php:26
src
FileUpload
DTO
ProcessingStatus.php
Generated on Sat Jan 18 2025 19:01:42 for ILIAS by
1.8.13 (using
Doxyfile
)