1 | <?php |
||
5 | class Manipulations |
||
6 | { |
||
7 | const CROP_TOP_LEFT = 'crop-top-left'; |
||
8 | const CROP_TOP = 'crop-top'; |
||
9 | const CROP_TOP_RIGHT = 'crop-top-right'; |
||
10 | const CROP_LEFT = 'crop-left'; |
||
11 | const CROP_CENTER = 'crop-center'; |
||
12 | const CROP_RIGHT = 'crop-right'; |
||
13 | const CROP_BOTTOM_LEFT = 'crop-bottom-left'; |
||
14 | const CROP_BOTTOM = 'crop-bottom'; |
||
15 | const CROP_BOTTOM_RIGHT = 'crop-bottom-right'; |
||
16 | |||
17 | const ORIENTATION_AUTO = 'auto'; |
||
18 | const ORIENTATION_90 = 90; |
||
19 | const ORIENTATION_180 = 180; |
||
20 | const ORIENTATION_270 = 270; |
||
21 | |||
22 | const FIT_CONTAIN = 'contain'; |
||
23 | const FIT_MAX = 'max'; |
||
24 | const FIT_FILL = 'fill'; |
||
25 | const FIT_STRETCH = 'stretch'; |
||
26 | const FIT_CROP = 'crop'; |
||
27 | |||
28 | const BORDER_OVERLAY = 'overlay'; |
||
29 | const BORDER_SHRINK = 'shrink'; |
||
30 | const BORDER_EXPAND = 'expand'; |
||
31 | |||
32 | const FORMAT_JPG = 'jpg'; |
||
33 | const FORMAT_PJPG = 'pjpg'; |
||
34 | const FORMAT_PNG = 'png'; |
||
35 | const FORMAT_GIF = 'gif'; |
||
36 | |||
37 | /** @var array */ |
||
38 | protected $manipulations = []; |
||
39 | |||
40 | /** |
||
41 | * @param string $orientation |
||
42 | * @return $this |
||
43 | */ |
||
44 | public function orientation(string $orientation) |
||
48 | |||
49 | /** |
||
50 | * @param string $cropMethod |
||
51 | * @param int $width |
||
52 | * @param int $height |
||
53 | * @return $this |
||
54 | * |
||
55 | * @internal param string $method |
||
56 | */ |
||
57 | public function crop(string $cropMethod, int $width, int $height) |
||
64 | |||
65 | /** |
||
66 | * @param int $width |
||
67 | * |
||
68 | * @return $this |
||
69 | */ |
||
70 | public function width(int $width) |
||
74 | |||
75 | /** |
||
76 | * @param int $height |
||
77 | * |
||
78 | * @return $this |
||
79 | */ |
||
80 | public function height(int $height) |
||
84 | |||
85 | public function fit(string $fitMethod, int $width, int $height) |
||
92 | |||
93 | public function devicePixelRatio(int $ratio) |
||
97 | |||
98 | public function brightness(int $brightness) |
||
102 | |||
103 | public function gamma(float $gamma) |
||
107 | |||
108 | public function contrast(int $contrast) |
||
112 | |||
113 | public function sharpen(int $sharpen) |
||
117 | |||
118 | public function blur(int $blur) |
||
122 | |||
123 | public function pixelate(int $pixelate) |
||
127 | |||
128 | public function greyscale() |
||
132 | |||
133 | public function sepia() |
||
137 | |||
138 | public function background(string $colorName) |
||
142 | |||
143 | public function border(int $width, string $color, string $borderType = 'overlay') |
||
147 | |||
148 | public function quality(int $quality) |
||
152 | |||
153 | public function format(string $format) |
||
157 | |||
158 | protected function filter(string $filterName) |
||
162 | |||
163 | public function hasManipulation($manipulationName): bool |
||
167 | |||
168 | public function getManipulation($manipulationName): bool |
||
178 | |||
179 | |||
180 | protected function setManipulation(array $arguments, string $operation = null) |
||
188 | |||
189 | public function mergeManipulations(Manipulations $manipulations) |
||
195 | |||
196 | public function toArray(): array |
||
200 | } |
||
201 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.