original_string: public function capability()
      {
          if ( $this->state != self::STATE_NOT_AUTHENTICATED &&
               $this->state != self::STATE_AUTHENTICATED &&
               $this->state != self::STATE_SELECTED &&
               $this->state != self::STATE_SELECTED_READONLY )
          {
              throw new ezcMailTransportException( "Trying to request capability when not connected to server." );
          }
  
          $tag = $this->getNextTag();
          $this->connection->sendData( "{$tag} CAPABILITY" );
  
          $response = $this->connection->getLine();
          while ( $this->responseType( $response ) != self::RESPONSE_UNTAGGED &&
                  strpos( $response, '* CAPABILITY ' ) === false )
          {
              $response = $this->connection->getLine();
          }
          $result = trim( $response );
  
          $response = trim( $this->getResponse( $tag ) );
          if ( $this->responseType( $response ) != self::RESPONSE_OK )
          {
              throw new ezcMailTransportException( "The IMAP server responded negative to the CAPABILITY command: {$response}." );
          }
  
          return explode( ' ', str_replace( '* CAPABILITY ', '', $result ) );
      }
code: public function capability()
      {
          if ( $this->state != self::STATE_NOT_AUTHENTICATED &&
               $this->state != self::STATE_AUTHENTICATED &&
               $this->state != self::STATE_SELECTED &&
               $this->state != self::STATE_SELECTED_READONLY )
          {
              throw new ezcMailTransportException( "Trying to request capability when not connected to server." );
          }
  
          $tag = $this->getNextTag();
          $this->connection->sendData( "{$tag} CAPABILITY" );
  
          $response = $this->connection->getLine();
          while ( $this->responseType( $response ) != self::RESPONSE_UNTAGGED &&
                  strpos( $response, '* CAPABILITY ' ) === false )
          {
              $response = $this->connection->getLine();
          }
          $result = trim( $response );
  
          $response = trim( $this->getResponse( $tag ) );
          if ( $this->responseType( $response ) != self::RESPONSE_OK )
          {
              throw new ezcMailTransportException( "The IMAP server responded negative to the CAPABILITY command: {$response}." );
          }
  
          return explode( ' ', str_replace( '* CAPABILITY ', '', $result ) );
      }
code_tokens: public function capability ( ) { if ( $ this -> state != self :: STATE_NOT_AUTHENTICATED && $ this -> state != self :: STATE_AUTHENTICATED && $ this -> state != self :: STATE_SELECTED && $ this -> state != self :: STATE_SELECTED_READONLY ) { throw new ezcMailTransportException ( "Trying to request capability when not connected to server." ) ; } $ tag = $ this -> getNextTag ( ) ; $ this -> connection -> sendData ( "{$tag} CAPABILITY" ) ; $ response = $ this -> connection -> getLine ( ) ; while ( $ this -> responseType ( $ response ) != self :: RESPONSE_UNTAGGED && strpos ( $ response , '* CAPABILITY ' ) === false ) { $ response = $ this -> connection -> getLine ( ) ; } $ result = trim ( $ response ) ; $ response = trim ( $ this -> getResponse ( $ tag ) ) ; if ( $ this -> responseType ( $ response ) != self :: RESPONSE_OK ) { throw new ezcMailTransportException ( "The IMAP server responded negative to the CAPABILITY command: {$response}." ) ; } return explode ( ' ' , str_replace ( '* CAPABILITY ' , '' , $ result ) ) ; }
docstring: Returns an array with the capabilities of the IMAP server.
  
  The returned array will be something like this:
  <code>
  array( 'IMAP4rev1', 'SASL-IR SORT', 'THREAD=REFERENCES', 'MULTIAPPEND',
  'UNSELECT', 'LITERAL+', 'IDLE', 'CHILDREN', 'NAMESPACE',
  'LOGIN-REFERRALS'
  );
  </code>
  
  Before calling this method, a connection to the IMAP server must be
  established.
  
  @throws ezcMailTransportException
  if there was no connection to the server
  or if the server sent a negative response
  @return array(string)
docstring_tokens: Returns an array with the capabilities of the IMAP server .