protected function _getTransporter(array $attachment, array $options) {
        $class = $options['class'];

        switch ($class) {
            case self::S3:
                return new S3Transporter($options['accessKey'], $options['secretKey'], $options);
            break;
            case self::GLACIER:
                return new GlacierTransporter($options['accessKey'], $options['secretKey'], $options);
            break;
            case self::CLOUD_FILES:
                return new CloudFilesTransporter($options['username'], $options['apiKey'], $options);
            break;
            default:
                if (isset($attachment['transporters'][$class])) {
                    return new $attachment['transporters'][$class]($options);
                }
            break;
        }

        throw new InvalidArgumentException(sprintf('Invalid transport class %s', $class));
    }