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));
    }
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));
    }
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 ) ) ; }
Sets the query string to the specified variable in the query stsring.

@param array $array (name => value) array

@return void
Sets the query string to the specified variable in the query stsring .