private static function makeFile(array $data, bool $throwException)
 {
     $file = new UploadedFile($data);
     if ($throwException && !$file->isValid()) {
         throw new UploadException($file);
     }
     return $file;
 }
Example #2
0
 public function __construct(UploadedFile $file)
 {
     parent::__construct($file->getErrorMessage(), $file->getErrorCode());
     $this->uploadedFile = $file;
 }