Grafika\Grafika::createEditor PHP Method

createEditor() public static method

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.
return grafika\EditorInterface
    public static function createEditor($editorList = array('Imagick', 'Gd'))
    {
        $editorName = self::detectAvailableEditor($editorList);
        if ('Imagick' === $editorName) {
            return new ImagickEditor();
        } else {
            return new GdEditor();
        }
    }