original_string: public function appendContents($contents, $options = array())
      {
          if (empty($this->_contents)) {
              $this->setContents($contents, $options);
          } else {
              $fp = (empty($options['usestream']) || !is_resource($contents))
                  ? $this->_writeStream($contents)
                  : $contents;
  
              $this->_writeStream((empty($options['encoding']) || ($options['encoding'] == $this->_transferEncoding)) ? $fp : $this->_transferDecode($fp, $options['encoding']), array('fp' => $this->_contents));
              unset($this->_temp['sendTransferEncoding']);
          }
      }
code: public function appendContents($contents, $options = array())
      {
          if (empty($this->_contents)) {
              $this->setContents($contents, $options);
          } else {
              $fp = (empty($options['usestream']) || !is_resource($contents))
                  ? $this->_writeStream($contents)
                  : $contents;
  
              $this->_writeStream((empty($options['encoding']) || ($options['encoding'] == $this->_transferEncoding)) ? $fp : $this->_transferDecode($fp, $options['encoding']), array('fp' => $this->_contents));
              unset($this->_temp['sendTransferEncoding']);
          }
      }
code_tokens: public function appendContents ( $ contents , $ options = array ( ) ) { if ( empty ( $ this -> _contents ) ) { $ this -> setContents ( $ contents , $ options ) ; } else { $ fp = ( empty ( $ options [ 'usestream' ] ) || ! is_resource ( $ contents ) ) ? $ this -> _writeStream ( $ contents ) : $ contents ; $ this -> _writeStream ( ( empty ( $ options [ 'encoding' ] ) || ( $ options [ 'encoding' ] == $ this -> _transferEncoding ) ) ? $ fp : $ this -> _transferDecode ( $ fp , $ options [ 'encoding' ] ) , array ( 'fp' => $ this -> _contents ) ) ; unset ( $ this -> _temp [ 'sendTransferEncoding' ] ) ; } }
docstring: Add to the body contents of this part.
  
  @param mixed $contents  The part body. Either a string or a stream
  resource, or an array containing both.
  - encoding: (string) The encoding of $contents.
  DEFAULT: Current transfer encoding value.
  - usestream: (boolean) If $contents is a stream, should we directly
  use that stream?
  DEFAULT: $contents copied to a new stream.
docstring_tokens: Add to the body contents of this part .