protected function _getTransformer(array $attachment, array $options) {
        $class = isset($options['method']) ? $options['method'] : $options['class'];

        switch ($class) {
            case self::CROP:
                return new CropTransformer($options);
            break;
            case self::FLIP:
                return new FlipTransformer($options);
            break;
            case self::RESIZE:
                return new ResizeTransformer($options);
            break;
            case self::SCALE:
                return new ScaleTransformer($options);
            break;
            case self::ROTATE:
                return new RotateTransformer($options);
            break;
            case self::EXIF:
                return new ExifTransformer($options);
            break;
            case self::FIT:
                return new FitTransformer($options);
            break;
            default:
                if (isset($attachment['transformers'][$class])) {
                    return new $attachment['transformers'][$class]($options);
                }
            break;
        }

        throw new InvalidArgumentException(sprintf('Invalid transform class %s', $class));
    }
protected function _getTransformer(array $attachment, array $options) {
        $class = isset($options['method']) ? $options['method'] : $options['class'];

        switch ($class) {
            case self::CROP:
                return new CropTransformer($options);
            break;
            case self::FLIP:
                return new FlipTransformer($options);
            break;
            case self::RESIZE:
                return new ResizeTransformer($options);
            break;
            case self::SCALE:
                return new ScaleTransformer($options);
            break;
            case self::ROTATE:
                return new RotateTransformer($options);
            break;
            case self::EXIF:
                return new ExifTransformer($options);
            break;
            case self::FIT:
                return new FitTransformer($options);
            break;
            default:
                if (isset($attachment['transformers'][$class])) {
                    return new $attachment['transformers'][$class]($options);
                }
            break;
        }

        throw new InvalidArgumentException(sprintf('Invalid transform class %s', $class));
    }
protected function _getTransformer ( array $ attachment , array $ options ) { $ class = isset ( $ options [ 'method' ] ) ? $ options [ 'method' ] : $ options [ 'class' ] ; switch ( $ class ) { case self :: CROP : return new CropTransformer ( $ options ) ; break ; case self :: FLIP : return new FlipTransformer ( $ options ) ; break ; case self :: RESIZE : return new ResizeTransformer ( $ options ) ; break ; case self :: SCALE : return new ScaleTransformer ( $ options ) ; break ; case self :: ROTATE : return new RotateTransformer ( $ options ) ; break ; case self :: EXIF : return new ExifTransformer ( $ options ) ; break ; case self :: FIT : return new FitTransformer ( $ options ) ; break ; default : if ( isset ( $ attachment [ 'transformers' ] [ $ class ] ) ) { return new $ attachment [ 'transformers' ] [ $ class ] ( $ options ) ; } break ; } throw new InvalidArgumentException ( sprintf ( 'Invalid transform class %s' , $ class ) ) ; }
Return a Transformer based on the options.

@uses Transit\Transformer\Image\CropTransformer
@uses Transit\Transformer\Image\FlipTransformer
@uses Transit\Transformer\Image\ResizeTransformer
@uses Transit\Transformer\Image\ScaleTransformer
@uses Transit\Transformer\Image\RotateTransformer
@uses Transit\Transformer\Image\ExifTransformer
@uses Transit\Transformer\Image\FitTransformer

@param array $attachment
@param array $options
@return \Transit\Transformer
@throws \InvalidArgumentException
Return a Transformer based on the options .