1 | <?php |
||
7 | class HandlerTools |
||
8 | { |
||
9 | public static $handlers = [ |
||
10 | "win" => [ |
||
11 | "gif" => "gifsicle.exe", |
||
12 | "png" => "optipng.exe", |
||
13 | "jpg" => "jpegtran.exe", |
||
14 | "jpeg" => "jpegtran.exe", |
||
15 | "pngquant" => "pngquant.exe", |
||
16 | "webp" => "cwebp.exe", |
||
17 | ], |
||
18 | "darwin" => [ |
||
19 | "gif" => "gifsicle-mac", |
||
20 | "png" => "optipng-mac", |
||
21 | "jpg" => "jpegtran-mac", |
||
22 | "jpeg" => "jpegtran-mac", |
||
23 | "pngquant" => "pngquant-mac", |
||
24 | "webp" => "cwebp-mac9", |
||
25 | ], |
||
26 | "sunos" => [ |
||
27 | "gif" => "gifsicle-sol", |
||
28 | "png" => "optipng-sol", |
||
29 | "jpg" => "jpegtran-sol", |
||
30 | "jpeg" => "jpegtran-sol", |
||
31 | "pngquant" => "pngquant-sol", |
||
32 | "webp" => "cwebp-sol", |
||
33 | ], |
||
34 | "freebsd" =>[ |
||
35 | "gif" => "gifsicle-fbsd", |
||
36 | "png" => "optipng-fbsd", |
||
37 | "jpg" => "jpegtran-fbsd", |
||
38 | "jpeg" => "jpegtran-fbsd", |
||
39 | "pngquant" => "pngquant-fbsd", |
||
40 | "webp" => "cwebp-fbsd", |
||
41 | ], |
||
42 | "linux" => [ |
||
43 | "gif" => "gifsicle-linux", |
||
44 | "png" => "optipng-linux", |
||
45 | "jpg" => "jpegtran-linux", |
||
46 | "jpeg" => "jpegtran-linux", |
||
47 | "pngquant" => "pngquant-linux", |
||
48 | "webp" => "cwebp-linux", |
||
49 | ], |
||
50 | ]; |
||
51 | |||
52 | public static function getBinaryHandler($type) { |
||
61 | |||
62 | public static function getBinaryHandlers() { |
||
71 | |||
72 | } |