original_string: public function add($ids)
      {
          if (!is_null($ids)) {
              if (is_string($ids) &&
                  in_array($ids, array(self::ALL, self::SEARCH_RES, self::LARGEST))) {
                  $this->_ids = $ids;
              } elseif ($add = $this->_resolveIds($ids)) {
                  if (is_array($this->_ids) && !empty($this->_ids)) {
                      foreach ($add as $val) {
                          $this->_ids[] = $val;
                      }
                  } else {
                      $this->_ids = $add;
                  }
                  if (!$this->duplicates) {
                      $this->_ids = (count($this->_ids) > 25000)
                          ? array_unique($this->_ids)
                          : array_keys(array_flip($this->_ids));
                  }
              }
  
              $this->_sorted = is_array($this->_ids) && (count($this->_ids) === 1);
          }
      }
code: public function add($ids)
      {
          if (!is_null($ids)) {
              if (is_string($ids) &&
                  in_array($ids, array(self::ALL, self::SEARCH_RES, self::LARGEST))) {
                  $this->_ids = $ids;
              } elseif ($add = $this->_resolveIds($ids)) {
                  if (is_array($this->_ids) && !empty($this->_ids)) {
                      foreach ($add as $val) {
                          $this->_ids[] = $val;
                      }
                  } else {
                      $this->_ids = $add;
                  }
                  if (!$this->duplicates) {
                      $this->_ids = (count($this->_ids) > 25000)
                          ? array_unique($this->_ids)
                          : array_keys(array_flip($this->_ids));
                  }
              }
  
              $this->_sorted = is_array($this->_ids) && (count($this->_ids) === 1);
          }
      }
code_tokens: public function add ( $ ids ) { if ( ! is_null ( $ ids ) ) { if ( is_string ( $ ids ) && in_array ( $ ids , array ( self :: ALL , self :: SEARCH_RES , self :: LARGEST ) ) ) { $ this -> _ids = $ ids ; } elseif ( $ add = $ this -> _resolveIds ( $ ids ) ) { if ( is_array ( $ this -> _ids ) && ! empty ( $ this -> _ids ) ) { foreach ( $ add as $ val ) { $ this -> _ids [ ] = $ val ; } } else { $ this -> _ids = $ add ; } if ( ! $ this -> duplicates ) { $ this -> _ids = ( count ( $ this -> _ids ) > 25000 ) ? array_unique ( $ this -> _ids ) : array_keys ( array_flip ( $ this -> _ids ) ) ; } } $ this -> _sorted = is_array ( $ this -> _ids ) && ( count ( $ this -> _ids ) === 1 ) ; } }
docstring: Add IDs to the current object.
  
  @param mixed $ids  Either self::ALL, self::SEARCH_RES, self::LARGEST,
  Horde_Imap_Client_Ids object, array, or sequence
  string.
docstring_tokens: Add IDs to the current object .