1 | <?php |
||
10 | trait ImageStorage |
||
11 | { |
||
12 | use AssetHelper; |
||
13 | |||
14 | /** |
||
15 | * Store image file. |
||
16 | * |
||
17 | * @param mixed $file |
||
18 | * @param string|null $identifier |
||
19 | * @return string|null The stored path |
||
20 | */ |
||
21 | protected function storeImageFile($file, $identifier = null) |
||
44 | |||
45 | /** |
||
46 | * Get image filter. |
||
47 | * |
||
48 | * @see http://image.intervention.io/api/filter |
||
49 | * |
||
50 | * @param string|null $identifier |
||
51 | */ |
||
52 | protected function getImageFilter($identifier = null) |
||
56 | |||
57 | /** |
||
58 | * Get image encoding format. |
||
59 | * |
||
60 | * @see http://image.intervention.io/api/encode |
||
61 | * |
||
62 | * @param string|null $identifier |
||
63 | * @return string|null |
||
64 | */ |
||
65 | protected function getImageEncodingFormat($identifier = null) |
||
68 | |||
69 | /** |
||
70 | * Get image encoding quality. |
||
71 | * |
||
72 | * @see http://image.intervention.io/api/encode |
||
73 | * |
||
74 | * @param string|null $identifier |
||
75 | * @return int |
||
76 | */ |
||
77 | protected function getImageEncodingQuality($identifier = null) |
||
81 | |||
82 | /** |
||
83 | * Get image output directory. |
||
84 | * |
||
85 | * @param string|null $identifier |
||
86 | * @return string |
||
87 | */ |
||
88 | protected function getImageDirectory($identifier = null) |
||
92 | |||
93 | /** |
||
94 | * Get a "nested" image directory. |
||
95 | * |
||
96 | * @param string|null $identifier |
||
97 | * @return string|null |
||
98 | */ |
||
99 | protected function getImageNestedDirectory($identifier = null) |
||
103 | |||
104 | /** |
||
105 | * Get image output filename. |
||
106 | * |
||
107 | * @param \Intervention\Image\Image $image |
||
108 | * @param string|null $identifier |
||
109 | * @return string |
||
110 | */ |
||
111 | protected function getImageFilename($image, $identifier = null) |
||
115 | } |
||
116 |