1 | <?php |
||
5 | class MediaCollection |
||
6 | { |
||
7 | /** @var string */ |
||
8 | public $name = ''; |
||
9 | |||
10 | /** @var string */ |
||
11 | public $diskName = ''; |
||
12 | |||
13 | /** @var callable */ |
||
14 | public $mediaConversionRegistrations; |
||
15 | |||
16 | /** @var callable */ |
||
17 | public $acceptsFile; |
||
18 | |||
19 | /** @var bool */ |
||
20 | public $singleFile = false; |
||
21 | |||
22 | /** @var string */ |
||
23 | public $fallbackUrl = ''; |
||
24 | |||
25 | /** @var string */ |
||
26 | public $fallbackPath = ''; |
||
27 | |||
28 | public function __construct(string $name) |
||
39 | |||
40 | public static function create($name) |
||
44 | |||
45 | public function useDisk(string $diskName): self |
||
51 | |||
52 | public function acceptsFile(callable $acceptsFile): self |
||
58 | |||
59 | public function singleFile(): self |
||
65 | |||
66 | public function registerMediaConversions(callable $mediaConversionRegistrations) |
||
70 | |||
71 | public function useFallbackUrl(string $url): self |
||
77 | |||
78 | public function useFallbackPath(string $path): self |
||
84 | } |
||
85 |