original_string: public function write($data, $eol = false)
      {
          if ($eol) {
              $buffer = $this->_buffer;
              $debug = $this->client_debug;
              $this->_buffer = '';
  
              $this->client_debug = true;
  
              if (fwrite($this->_stream, $buffer . $data . ($eol ? "\r\n" : '')) === false) {
                  throw new Horde_Imap_Client_Exception(
                      Horde_Imap_Client_Translation::r("Server write error."),
                      Horde_Imap_Client_Exception::SERVER_WRITEERROR
                  );
              }
  
              if ($debug) {
                  $this->_params['debug']->client($buffer . $data);
              }
          } else {
              $this->_buffer .= $data;
          }
      }
code: public function write($data, $eol = false)
      {
          if ($eol) {
              $buffer = $this->_buffer;
              $debug = $this->client_debug;
              $this->_buffer = '';
  
              $this->client_debug = true;
  
              if (fwrite($this->_stream, $buffer . $data . ($eol ? "\r\n" : '')) === false) {
                  throw new Horde_Imap_Client_Exception(
                      Horde_Imap_Client_Translation::r("Server write error."),
                      Horde_Imap_Client_Exception::SERVER_WRITEERROR
                  );
              }
  
              if ($debug) {
                  $this->_params['debug']->client($buffer . $data);
              }
          } else {
              $this->_buffer .= $data;
          }
      }
code_tokens: public function write ( $ data , $ eol = false ) { if ( $ eol ) { $ buffer = $ this -> _buffer ; $ debug = $ this -> client_debug ; $ this -> _buffer = '' ; $ this -> client_debug = true ; if ( fwrite ( $ this -> _stream , $ buffer . $ data . ( $ eol ? "\r\n" : '' ) ) === false ) { throw new Horde_Imap_Client_Exception ( Horde_Imap_Client_Translation :: r ( "Server write error." ) , Horde_Imap_Client_Exception :: SERVER_WRITEERROR ) ; } if ( $ debug ) { $ this -> _params [ 'debug' ] -> client ( $ buffer . $ data ) ; } } else { $ this -> _buffer .= $ data ; } }
docstring: Writes data to the IMAP output stream.
  
  @param string $data  String data.
  @param boolean $eol  Append EOL?
  
  @throws Horde_Imap_Client_Exception
docstring_tokens: Writes data to the IMAP output stream .