original_string: 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));
      }
code: 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));
      }
code_tokens: 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 ) ) ; }
docstring: 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
docstring_tokens: Return a Transporter based on the options .