1 | <?php |
||
7 | trait Storable |
||
8 | { |
||
9 | /** |
||
10 | * Determines where to save the converted file. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $disk; |
||
15 | |||
16 | /** |
||
17 | * Determines the path where to save the converted file. |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $path; |
||
22 | |||
23 | /** |
||
24 | * Set where to store the converted file. |
||
25 | * |
||
26 | * @param string $disk |
||
27 | * @return $this |
||
28 | */ |
||
29 | public function disk(string $disk) |
||
35 | |||
36 | /** |
||
37 | * Set path to where to store the converted file. |
||
38 | * |
||
39 | * @param string $path |
||
40 | * @return $this |
||
41 | */ |
||
42 | public function saveTo(string $path) |
||
48 | |||
49 | /** |
||
50 | * Execute the store. |
||
51 | * |
||
52 | * @param mixed $resultContent |
||
53 | * @return string |
||
54 | */ |
||
55 | protected function store($resultContent) |
||
65 | |||
66 | /** |
||
67 | * Ensures the path not to be null if it is null it will set a default path. |
||
68 | * |
||
69 | * @return void |
||
70 | */ |
||
71 | protected function ensurePathIsNotNull() |
||
81 | |||
82 | /** |
||
83 | * Determine if filename includes file extension. |
||
84 | * |
||
85 | * @param string $filename |
||
86 | * @return boolean |
||
87 | */ |
||
88 | protected function hasExtension($filename) |
||
92 | |||
93 | /** |
||
94 | * Get audio file extension. |
||
95 | * |
||
96 | * @return string |
||
97 | */ |
||
98 | protected function getExtension() |
||
102 | } |
||
103 |