1 | <?php |
||
12 | class ConversionCollection extends Collection |
||
13 | { |
||
14 | /** @var \Spatie\MediaLibrary\Models\Media */ |
||
15 | protected $media; |
||
16 | |||
17 | /** |
||
18 | * @param \Spatie\MediaLibrary\Models\Media $media |
||
19 | * |
||
20 | * @return static |
||
21 | */ |
||
22 | public static function createForMedia(Media $media) |
||
26 | |||
27 | /** |
||
28 | * @param \Spatie\MediaLibrary\Models\Media $media |
||
29 | * |
||
30 | * @return $this |
||
31 | */ |
||
32 | public function setMedia(Media $media) |
||
44 | |||
45 | /** |
||
46 | * Get a conversion by it's name. |
||
47 | * |
||
48 | * @param string $name |
||
49 | * |
||
50 | * @return mixed |
||
51 | * |
||
52 | * @throws \Spatie\MediaLibrary\Exceptions\InvalidConversion |
||
53 | */ |
||
54 | public function getByName(string $name): Conversion |
||
66 | |||
67 | /** |
||
68 | * Add the conversion that are defined on the related model of |
||
69 | * the given media. |
||
70 | * |
||
71 | * @param \Spatie\MediaLibrary\Models\Media $media |
||
72 | */ |
||
73 | protected function addConversionsFromRelatedModel(Media $media) |
||
95 | |||
96 | /** |
||
97 | * Add the extra manipulations that are defined on the given media. |
||
98 | * |
||
99 | * @param \Spatie\MediaLibrary\Models\Media $media |
||
100 | */ |
||
101 | protected function addManipulationsFromDb(Media $media) |
||
107 | |||
108 | public function getConversions(string $collectionName = ''): self |
||
116 | |||
117 | /* |
||
118 | * Get all the conversions in the collection that should be queued. |
||
119 | */ |
||
120 | public function getQueuedConversions(string $collectionName = ''): self |
||
124 | |||
125 | /* |
||
126 | * Add the given manipulation to the conversion with the given name. |
||
127 | */ |
||
128 | protected function addManipulationToConversion(Manipulations $manipulations, string $conversionName) |
||
151 | |||
152 | /* |
||
153 | * Get all the conversions in the collection that should not be queued. |
||
154 | */ |
||
155 | public function getNonQueuedConversions(string $collectionName = ''): self |
||
159 | |||
160 | /* |
||
161 | * Return the list of conversion files. |
||
162 | */ |
||
163 | public function getConversionsFiles(string $collectionName = ''): self |
||
171 | } |
||
172 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: