original_string: public function setQueryVariables($array)
      {
          if (! is_array($array)) {
  
              throw new InvalidArgumentException('Must pass an array to setQueryVariables()');
          }
  
          $parts = array();
  
          foreach ($array as $name => $value) {
  
              $name = urlencode($name);
  
              if (! is_null($value)) {
  
                  $parts[] = $name . '=' . urlencode($value);
  
              } else {
  
                  $parts[] = $name;
              }
          }
  
          $this->setQuery(implode('&', $parts));
      }
code: public function setQueryVariables($array)
      {
          if (! is_array($array)) {
  
              throw new InvalidArgumentException('Must pass an array to setQueryVariables()');
          }
  
          $parts = array();
  
          foreach ($array as $name => $value) {
  
              $name = urlencode($name);
  
              if (! is_null($value)) {
  
                  $parts[] = $name . '=' . urlencode($value);
  
              } else {
  
                  $parts[] = $name;
              }
          }
  
          $this->setQuery(implode('&', $parts));
      }
code_tokens: public function setQueryVariables ( $ array ) { if ( ! is_array ( $ array ) ) { throw new InvalidArgumentException ( 'Must pass an array to setQueryVariables()' ) ; } $ parts = array ( ) ; foreach ( $ array as $ name => $ value ) { $ name = urlencode ( $ name ) ; if ( ! is_null ( $ value ) ) { $ parts [ ] = $ name . '=' . urlencode ( $ value ) ; } else { $ parts [ ] = $ name ; } } $ this -> setQuery ( implode ( '&' , $ parts ) ) ; }
docstring: Sets the query string to the specified variable in the query stsring.
  
  @param array $array (name => value) array
  
  @return void
docstring_tokens: Sets the query string to the specified variable in the query stsring .