original_string: public function setTransferEncoding($encoding, $options = array())
      {
          if (empty($encoding) ||
              (empty($options['send']) && !empty($this->_contents))) {
              return;
          }
  
          switch ($encoding = Horde_String::lower($encoding)) {
          case '7bit':
          case '8bit':
          case 'base64':
          case 'binary':
          case 'quoted-printable':
          // Non-RFC types, but old mailers may still use
          case 'uuencode':
          case 'x-uuencode':
          case 'x-uue':
              if (empty($options['send'])) {
                  $this->_transferEncoding = $encoding;
              } else {
                  $this->_temp['sendEncoding'] = $encoding;
              }
              break;
  
          default:
              if (empty($options['send'])) {
                  /* RFC 2045: Any entity with unrecognized encoding must be
                   * treated as if it has a Content-Type of
                   * "application/octet-stream" regardless of what the
                   * Content-Type field actually says. */
                  $this->setType('application/octet-stream');
                  $this->_transferEncoding = null;
              }
              break;
          }
      }
code: public function setTransferEncoding($encoding, $options = array())
      {
          if (empty($encoding) ||
              (empty($options['send']) && !empty($this->_contents))) {
              return;
          }
  
          switch ($encoding = Horde_String::lower($encoding)) {
          case '7bit':
          case '8bit':
          case 'base64':
          case 'binary':
          case 'quoted-printable':
          // Non-RFC types, but old mailers may still use
          case 'uuencode':
          case 'x-uuencode':
          case 'x-uue':
              if (empty($options['send'])) {
                  $this->_transferEncoding = $encoding;
              } else {
                  $this->_temp['sendEncoding'] = $encoding;
              }
              break;
  
          default:
              if (empty($options['send'])) {
                  /* RFC 2045: Any entity with unrecognized encoding must be
                   * treated as if it has a Content-Type of
                   * "application/octet-stream" regardless of what the
                   * Content-Type field actually says. */
                  $this->setType('application/octet-stream');
                  $this->_transferEncoding = null;
              }
              break;
          }
      }
code_tokens: public function setTransferEncoding ( $ encoding , $ options = array ( ) ) { if ( empty ( $ encoding ) || ( empty ( $ options [ 'send' ] ) && ! empty ( $ this -> _contents ) ) ) { return ; } switch ( $ encoding = Horde_String :: lower ( $ encoding ) ) { case '7bit' : case '8bit' : case 'base64' : case 'binary' : case 'quoted-printable' : // Non-RFC types, but old mailers may still use case 'uuencode' : case 'x-uuencode' : case 'x-uue' : if ( empty ( $ options [ 'send' ] ) ) { $ this -> _transferEncoding = $ encoding ; } else { $ this -> _temp [ 'sendEncoding' ] = $ encoding ; } break ; default : if ( empty ( $ options [ 'send' ] ) ) { /* RFC 2045: Any entity with unrecognized encoding must be
                   * treated as if it has a Content-Type of
                   * "application/octet-stream" regardless of what the
                   * Content-Type field actually says. */ $ this -> setType ( 'application/octet-stream' ) ; $ this -> _transferEncoding = null ; } break ; } }
docstring: Set the transfer encoding to use for this part.
  
  Only needed in the following circumstances:
  1.) Indicate what the transfer encoding is if the data has not yet been
  set in the object (can only be set if there presently are not
  any contents).
  2.) Force the encoding to a certain type on a toString() call (if
  'send' is true).
  
  @param string $encoding  The transfer encoding to use.
  @param array $options    Additional options:
  - send: (boolean) If true, use $encoding as the sending encoding.
  DEFAULT: $encoding is used to change the base encoding.
docstring_tokens: Set the transfer encoding to use for this part .