Total Complexity | 1 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class UploaderException extends RuntimeException |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * Upload error code -> error message map |
||
16 | * |
||
17 | * @var string[] |
||
18 | */ |
||
19 | private $messages = [ |
||
20 | 0 => "There is no error, the file uploaded with success", |
||
21 | 1 => "The uploaded file exceeds the upload_max_filesize directive in php.ini", |
||
22 | 2 => "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form", |
||
23 | 3 => "The uploaded file was only partially uploaded", |
||
24 | 4 => "No file was uploaded", |
||
25 | 6 => "Missing a temporary folder", |
||
26 | ]; |
||
27 | |||
28 | |||
29 | /** |
||
30 | * Constructs the upload error exception using the given upload error code. |
||
31 | * |
||
32 | * @param string $code |
||
33 | */ |
||
34 | public function __construct($code) |
||
41 |