original_string: public function disconnect()
      {
          if ( $this->state !== self::STATE_NOT_CONNECTED
               && $this->connection->isConnected() === true )
          {
              $tag = $this->getNextTag();
              $this->connection->sendData( "{$tag} LOGOUT" );
              // discard the "bye bye" message ("{$tag} OK Logout completed.")
              $this->getResponse( $tag );
              $this->state = self::STATE_LOGOUT;
              $this->selectedMailbox = null;
  
              $this->connection->close();
              $this->connection = null;
              $this->state = self::STATE_NOT_CONNECTED;
          }
      }
code: public function disconnect()
      {
          if ( $this->state !== self::STATE_NOT_CONNECTED
               && $this->connection->isConnected() === true )
          {
              $tag = $this->getNextTag();
              $this->connection->sendData( "{$tag} LOGOUT" );
              // discard the "bye bye" message ("{$tag} OK Logout completed.")
              $this->getResponse( $tag );
              $this->state = self::STATE_LOGOUT;
              $this->selectedMailbox = null;
  
              $this->connection->close();
              $this->connection = null;
              $this->state = self::STATE_NOT_CONNECTED;
          }
      }
code_tokens: public function disconnect ( ) { if ( $ this -> state !== self :: STATE_NOT_CONNECTED && $ this -> connection -> isConnected ( ) === true ) { $ tag = $ this -> getNextTag ( ) ; $ this -> connection -> sendData ( "{$tag} LOGOUT" ) ; // discard the "bye bye" message ("{$tag} OK Logout completed.") $ this -> getResponse ( $ tag ) ; $ this -> state = self :: STATE_LOGOUT ; $ this -> selectedMailbox = null ; $ this -> connection -> close ( ) ; $ this -> connection = null ; $ this -> state = self :: STATE_NOT_CONNECTED ; } }
docstring: Disconnects the transport from the IMAP server.
docstring_tokens: Disconnects the transport from the IMAP server .