ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ProcessingStatus.php
Go to the documentation of this file.
1<?php
2
19namespace ILIAS\FileUpload\DTO;
20
35{
40 public const OK = 1;
45 public const REJECTED = 2;
50 public const PENDING = 3;
55 public const DENIED = 4;
56
57 private int $code;
58
70 public function __construct(int $code, private string $message)
71 {
72 if (!in_array($code, [self::OK, self::REJECTED, self::DENIED, self::PENDING], true)) {
73 throw new \InvalidArgumentException(
74 'Invalid upload status code received. The code must be OK or REJECTED.'
75 );
76 }
77
78 $this->code = $code;
79 }
80
81 public function getCode(): int
82 {
83 return $this->code;
84 }
85
86 public function getMessage(): string
87 {
88 return $this->message;
89 }
90}
__construct(int $code, private string $message)
ProcessingStatus constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Metadata.php:19
$message
Definition: xapiexit.php:31