1 | <?php |
||
8 | abstract class AbstractAttacherImage extends Model implements AttacherImageContract |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $processing_style_routine; |
||
14 | |||
15 | /** |
||
16 | * @var UploadedFile |
||
17 | */ |
||
18 | protected $uploaded_file; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $different_filename; |
||
24 | |||
25 | /** |
||
26 | * @param UploadedFile $file |
||
27 | * @param string $filename |
||
28 | * @return $this |
||
29 | */ |
||
30 | public function setAttributesFromFile(UploadedFile $file, $filename = NULL) |
||
50 | |||
51 | /** |
||
52 | * @return mixed owner model |
||
53 | */ |
||
54 | public function owner() |
||
58 | |||
59 | /** |
||
60 | * @return string |
||
61 | */ |
||
62 | public function getOwnerType() |
||
68 | |||
69 | /** |
||
70 | * Return the base_url followed by the path to the image related to the $processing_style after processing |
||
71 | * |
||
72 | * @param string|null $processing_style |
||
73 | * @return string |
||
74 | */ |
||
75 | public function getUrl($processing_style) |
||
79 | |||
80 | /** |
||
81 | * Return the the path to the image related to the $processing_style after processing |
||
82 | * |
||
83 | * @param string|null $processing_style |
||
84 | * @return string |
||
85 | */ |
||
86 | public function getPath($processing_style) |
||
90 | |||
91 | /** |
||
92 | * @param null|string $processing_style |
||
93 | * @return string |
||
94 | */ |
||
95 | public function getDeletePath($processing_style = NULL) |
||
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | public function getPreviousPath() |
||
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | public function getDifferentFilename() |
||
115 | |||
116 | /** |
||
117 | * @return $this |
||
118 | */ |
||
119 | public function setDifferentFilename() |
||
125 | |||
126 | /** |
||
127 | * @return bool |
||
128 | */ |
||
129 | public function hasDifferentFileName() |
||
133 | |||
134 | /** |
||
135 | * @return bool | null |
||
136 | */ |
||
137 | public function filenameIsDifferentFromOriginal() |
||
146 | |||
147 | /** |
||
148 | * @return string |
||
149 | */ |
||
150 | public function getProcessingStyleRoutine() |
||
154 | |||
155 | /** |
||
156 | * @param $name |
||
157 | * @return $this |
||
158 | */ |
||
159 | public function setProcessingStyleRoutine($name = NULL) |
||
165 | |||
166 | /** |
||
167 | * @return UploadedFile |
||
168 | */ |
||
169 | public function getUploadedFile() |
||
173 | |||
174 | /** |
||
175 | * @return UploadedFile |
||
176 | */ |
||
177 | public function setUploadedFile(UploadedFile $file) |
||
183 | |||
184 | /** |
||
185 | * @return string |
||
186 | */ |
||
187 | public function getFileNameAttribute() |
||
193 | |||
194 | /** |
||
195 | * @param string $name |
||
196 | * @return $this |
||
197 | */ |
||
198 | public function setFileNameAttribute($name) |
||
206 | |||
207 | /** |
||
208 | * @return string |
||
209 | */ |
||
210 | public function getFileExtensionAttribute() |
||
216 | |||
217 | /** |
||
218 | * @param string $extension |
||
219 | * @return $this |
||
220 | */ |
||
221 | public function setFileExtensionAttribute($extension) |
||
227 | |||
228 | /** |
||
229 | * @return string |
||
230 | */ |
||
231 | public function getFileSizeAttribute() |
||
237 | |||
238 | /** |
||
239 | * @param string $size |
||
240 | * @return $this |
||
241 | */ |
||
242 | public function setFileSizeAttribute($size) |
||
248 | |||
249 | /** |
||
250 | * @return string |
||
251 | */ |
||
252 | public function getMimeTypeAttribute() |
||
258 | |||
259 | /** |
||
260 | * @param string $type |
||
261 | * @return $this |
||
262 | */ |
||
263 | public function setMimeTypeAttribute($type) |
||
269 | |||
270 | } |