1 | <?php |
||
8 | class MediaCollection |
||
9 | { |
||
10 | use Macroable; |
||
11 | |||
12 | /** @var string */ |
||
13 | public $name = ''; |
||
14 | |||
15 | /** @var string */ |
||
16 | public $diskName = ''; |
||
17 | |||
18 | /** @var callable */ |
||
19 | public $mediaConversionRegistrations; |
||
20 | |||
21 | /** @var bool */ |
||
22 | public $generateResponsiveImages = false; |
||
23 | |||
24 | /** @var callable */ |
||
25 | public $acceptsFile; |
||
26 | |||
27 | /** @var array $acceptsMimeTypes */ |
||
28 | public $acceptsMimeTypes = []; |
||
29 | |||
30 | /** @var int */ |
||
31 | public $collectionSizeLimit = false; |
||
32 | |||
33 | public $singleFile = false; |
||
34 | |||
35 | /** @var string */ |
||
36 | public $fallbackUrl = ''; |
||
37 | |||
38 | /** @var string */ |
||
39 | public $fallbackPath = ''; |
||
40 | |||
41 | public function __construct(string $name) |
||
52 | |||
53 | public static function create($name) |
||
57 | |||
58 | public function useDisk(string $diskName): self |
||
64 | |||
65 | public function acceptsFile(callable $acceptsFile): self |
||
71 | |||
72 | public function acceptsMimeTypes(array $mimeTypes): self |
||
78 | |||
79 | public function singleFile(): self |
||
83 | |||
84 | public function onlyKeepLatest(int $maximumNumberOfItemsInCollection): self |
||
96 | |||
97 | public function registerMediaConversions(callable $mediaConversionRegistrations) |
||
101 | |||
102 | public function useFallbackUrl(string $url): self |
||
108 | |||
109 | public function useFallbackPath(string $path): self |
||
115 | |||
116 | public function withResponsiveImages(): self |
||
122 | } |
||
123 |