1 | <?php |
||
7 | class BackupPath |
||
8 | { |
||
9 | /** @var array */ |
||
10 | protected static $allowedMimeTypes = [ |
||
11 | 'application/zip', 'application/x-zip', 'application/x-gzip', |
||
12 | ]; |
||
13 | |||
14 | /** |
||
15 | * Check if a path on a disk represents a backup. |
||
16 | * |
||
17 | * @param \Illuminate\Contracts\Filesystem\Filesystem|null $disk |
||
18 | * @param string $path |
||
19 | * |
||
20 | * @return bool |
||
21 | */ |
||
22 | public function check($disk, $path) |
||
26 | |||
27 | /** |
||
28 | * @param string $path |
||
29 | * |
||
30 | * @return bool |
||
31 | */ |
||
32 | protected function checkExtension($path) |
||
36 | |||
37 | /** |
||
38 | * @param \Illuminate\Contracts\Filesystem\Filesystem|null $disk |
||
39 | * @param string $path |
||
40 | * |
||
41 | * @return bool |
||
42 | */ |
||
43 | protected function checkMimeType($disk, $path) |
||
47 | |||
48 | /** |
||
49 | * @param \Illuminate\Contracts\Filesystem\Filesystem|null $disk |
||
50 | * @param string $path |
||
51 | * |
||
52 | * @return string|false |
||
53 | */ |
||
54 | protected function mimeType($disk, $path) |
||
67 | } |
||
68 |