Convert the query string parameters to a query string string
string
public function __toString() {
if (empty($this->data)) {
return '';
}
$queryString = $this->prefix;
$firstValue = true;
foreach ($this
->encodeData($this->data) as $name => $value) {
$value = $value === null ? array(
'',
) : (array) $value;
foreach ($value as $v) {
if ($firstValue) {
$firstValue = false;
}
else {
$queryString .= $this->fieldSeparator;
}
$queryString .= $name;
if ($v !== self::BLANK) {
$queryString .= $this->valueSeparator . $v;
}
}
}
return $queryString;
}