Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * Jingga |
4 | * |
5 | * PHP Version 8.1 |
6 | * |
7 | * @package phpOMS\Message |
8 | * @copyright Dennis Eichhorn |
9 | * @license OMS License 2.0 |
10 | * @version 1.0.0 |
11 | * @link https://jingga.app |
12 | */ |
13 | declare(strict_types=1); |
14 | |
15 | namespace phpOMS\Message; |
16 | |
17 | use phpOMS\Contract\StreamInterface; |
18 | |
19 | /** |
20 | * Upload interface. |
21 | * |
22 | * @package phpOMS\Message |
23 | * @license OMS License 2.0 |
24 | * @link https://jingga.app |
25 | * @since 1.0.0 |
26 | */ |
27 | interface UploadedFileInterface |
28 | { |
29 | /** |
30 | * Retrieve a stream representing the uploaded file. |
31 | * |
32 | * @since 1.0.0 |
33 | */ |
34 | public function getStream() : StreamInterface; |
35 | |
36 | /** |
37 | * Move the uploaded file to a new location. |
38 | * |
39 | * @param string $targetPath Path to new location |
40 | * |
41 | * @return void |
42 | * |
43 | * @since 1.0.0 |
44 | */ |
45 | public function moveTo(string $targetPath) : void; |
46 | |
47 | /** |
48 | * Retrieve the file size. |
49 | * |
50 | * @return int |
51 | * |
52 | * @since 1.0.0 |
53 | */ |
54 | public function getSize() : int; |
55 | |
56 | /** |
57 | * Retrieve the error associated with the uploaded file. |
58 | * |
59 | * @return int |
60 | * |
61 | * @since 1.0.0 |
62 | */ |
63 | public function getError() : int; |
64 | |
65 | /** |
66 | * Retrieve the filename sent by the client. |
67 | * |
68 | * @return string |
69 | * |
70 | * @since 1.0.0 |
71 | */ |
72 | public function getClientFilename() : string; |
73 | |
74 | /** |
75 | * Retrieve the media type sent by the client. |
76 | * |
77 | * @return string |
78 | * |
79 | * @since 1.0.0 |
80 | */ |
81 | public function getClientMediaType() : string; |
82 | } |