12345678910111213141516171819202122232425262728 |
- <?php
- namespace common\helpers;
- class GrafikaHelper
- {
-
- public static function getSupportEditorLib()
- {
- switch (true) {
- case function_exists('gd_info'):
- return ['Gd'];
- case class_exists('\Imagick') && method_exists((new \Imagick()), 'setImageOpacity'):
- return ['Imagick'];
- default:
- return ['Gd'];
- }
- }
- }
|