1 | <?php |
||
16 | final class File |
||
17 | { |
||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $name; |
||
22 | |||
23 | /** |
||
24 | * @var UploadedFile |
||
25 | */ |
||
26 | protected $uploadedFile; |
||
27 | |||
28 | /** |
||
29 | * Is uploaded |
||
30 | * |
||
31 | * @var boolean |
||
32 | */ |
||
33 | protected $uploaded; |
||
34 | |||
35 | /** |
||
36 | * @var \Exception |
||
37 | */ |
||
38 | protected $exception; |
||
39 | |||
40 | /** |
||
41 | * Storage system returned. |
||
42 | * |
||
43 | * @var \Symfony\Component\HttpFoundation\File\File|mixed |
||
44 | */ |
||
45 | protected $details; |
||
46 | |||
47 | public function __construct( |
||
56 | |||
57 | /** |
||
58 | * Gets the key generated by `Namer` |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | public function getName() |
||
66 | |||
67 | /** |
||
68 | * Access file details saved in client by this object. |
||
69 | * |
||
70 | * @return UploadedFile |
||
71 | */ |
||
72 | public function getUploadedFile() |
||
76 | |||
77 | /** |
||
78 | * Checks whether the file is uploaded successfully. |
||
79 | * |
||
80 | * @return bool |
||
81 | */ |
||
82 | public function isUploaded() |
||
86 | |||
87 | /** |
||
88 | * The exception if the file is uploaded error. |
||
89 | * |
||
90 | * @return \Exception |
||
91 | */ |
||
92 | public function getException() |
||
96 | |||
97 | /** |
||
98 | * File details provided by storage layer. |
||
99 | * |
||
100 | * @return \Symfony\Component\HttpFoundation\File\File|mixed |
||
101 | */ |
||
102 | public function getDetails() |
||
106 | } |