1 | <?php |
||
15 | class UploadToStorage implements UploadInterface |
||
16 | { |
||
17 | /** |
||
18 | * File storage. |
||
19 | * |
||
20 | * @var StorageInterface |
||
21 | */ |
||
22 | private $storage; |
||
23 | |||
24 | /** |
||
25 | * File factory. |
||
26 | * |
||
27 | * @var FileFactoryInterface |
||
28 | */ |
||
29 | private $factory; |
||
30 | |||
31 | /** |
||
32 | * UploadToStorage constructor. |
||
33 | * |
||
34 | * @param StorageInterface $storage |
||
35 | * @param FileFactoryInterface $factory |
||
36 | */ |
||
37 | public function __construct(StorageInterface $storage, FileFactoryInterface $factory) |
||
42 | |||
43 | /** |
||
44 | * Send a file to storage. |
||
45 | * |
||
46 | * @param string $path |
||
47 | * @param string $name |
||
48 | * |
||
49 | * @return FileInterface |
||
50 | */ |
||
51 | public function sendToStorage($path, $name) |
||
59 | } |
||
60 |