| 1 | <?php namespace Modules\Media\Services; |
||
| 9 | class FileService |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var FileRepository |
||
| 13 | */ |
||
| 14 | private $file; |
||
| 15 | /** |
||
| 16 | * @var Repository |
||
| 17 | */ |
||
| 18 | private $config; |
||
| 19 | /** |
||
| 20 | * @var Queue |
||
| 21 | */ |
||
| 22 | private $queue; |
||
| 23 | |||
| 24 | public function __construct( |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param UploadedFile $file |
||
| 36 | * @return mixed |
||
| 37 | */ |
||
| 38 | public function store(UploadedFile $file) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Create the necessary thumbnails for the given file |
||
| 58 | * @param $savedFile |
||
| 59 | */ |
||
| 60 | private function createThumbnails($savedFile) |
||
| 67 | } |
||
| 68 |
If you suppress an error, we recommend checking for the error condition explicitly: