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));
    }
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));
    }
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 ) ) ; }
Return a Transporter based on the options.

@uses Transit\Transporter\Aws\S3Transporter
@uses Transit\Transporter\Aws\GlacierTransporter

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