Grafika\Grafika::createEditor PHP 메소드

createEditor() 공개 정적인 메소드

Creates the first available editor.
public static createEditor ( array $editorList = ['Imagick', 'Gd'] ) : grafika\EditorInterface
$editorList array Array of editor list names. Use this to change the order of evaluation for editors. Default order of evaluation is Imagick then GD.
리턴 grafika\EditorInterface
    public static function createEditor($editorList = array('Imagick', 'Gd'))
    {
        $editorName = self::detectAvailableEditor($editorList);
        if ('Imagick' === $editorName) {
            return new ImagickEditor();
        } else {
            return new GdEditor();
        }
    }