Calculates query string

@param   string  $name
@param   mixed   $value
@param   string  $postfix  The postfix to use for each variable (defaults to '')
@return  string
423834
protected function buildQuery(string $name, $value, string $postfix= ''): string
    {
        $query = '';
        if (is_array($value)) {
            foreach ($value as $k => $v) {
                if (is_int($k)) {
                    $query .= $this->buildQuery('', $v, $postfix . $name .'[]');
                } else {
                    $query .= $this->buildQuery('', $v, $postfix . $name . '[' . $k . ']');
                }
            }
        } elseif (null === $value) {
            $query .= '&' . urlencode($name) . $postfix;
        } elseif (false === $value) {
            $query .= '&' . urlencode($name) . $postfix . '=0';
        } elseif (true === $value) {
            $query .= '&' . urlencode($name) . $postfix . '=1';
        } else {
            $query .= '&' . urlencode($name) . $postfix . '=' . urlencode($value);
        }

        return $query;
    }
465418
public function addFilterValue(
        Result $result,
        string $filterName,
        string $value
    ): string {
        if (isset($this->routesCache[spl_object_hash($result)][$filterName])) {
            return str_replace(
                ['{id}', '{slug}'],
                $result->getAggregation($filterName)->getCounter($value)->getValues(),
                $this->routesCache[spl_object_hash($result)][$filterName]
            );
        }

        $urlParameters = $this->generateQueryUrlParameters($result, $filterName);
        if (
            !isset($urlParameters[$filterName]) ||
            !in_array($value, $urlParameters[$filterName])
        ) {
            $urlParameters[$filterName][] = $value;
        }

        $urlElements = $this->createUrlByUrlParameters(
            $result,
            $urlParameters
        );

        $templateRoute = in_array($urlElements['field'], [false, $filterName])
            ? $urlElements['template_path']
            : parse_url($urlElements['route'], PHP_URL_PATH);

        $filteredUrlParameters = $urlElements['url_parameters'];
        $routeQuery = parse_url($urlElements['route'], PHP_URL_QUERY);
        $route = rtrim("$templateRoute?$routeQuery", '?');
        if (isset($filteredUrlParameters[$filterName])) {
            $paremeterKey = array_search($value, $filteredUrlParameters[$filterName]);
            $route = str_replace(
                "{$filterName}[$paremeterKey]=$value",
                "{$filterName}[$paremeterKey]={id}",
                $route
            );
        }

        $this->routesCache[spl_object_hash($result)][$filterName] = $route;

        return $urlElements['route'];
    }
953589
protected function getValueFromParameterString($name, $paramString, $value)
    {
        $original = $paramString;

        while (preg_match('@^(\[([^\]]+)\])@', $paramString, $matches)) {
            $key = $matches[2];
            $paramString = str_replace($matches[1], '', $paramString);

            if (!isset($value[$key])) {
                throw new Exception\ParameterKeyDoesNotExistException($name, $original);
            }

            $value = $value[$key];

            if (empty($paramString)) {
                break;
            }
        }

        return $value;
    }
766433
public HttpClientRequestActionBuilder queryParam(String name, String value) {
        httpMessage.queryParam(name, value);
        return this;
    }
55013
private function Value($name)
    {
        $value = Request::PostData($this->prefix . $name);
        return Str::Trim($value);
    }
664351
public function setPost($name, $value = null)
    {
        if (!is_array($name)) {
            $this->posts[$name] = $value;
        } else {
            $this->posts = $name + $this->posts;
        }
    }
321116
public function queryParam($name, $value)
	{
		if($value === NULL)
		{
			unset($this->query[(string)$name]);
		}
		else
		{
			$this->query[(string)$name] = $value;
		}
		
		return $this;
	}
902077
private function extractVariablePart($name)
    {
        return StringHelper::substring($name, $this->prefixLength, strlen($name) - $this->postfixLength - 1);
    }
1323476
public function setQueryParameter($name, $value)
    {
        $this->query[(string) $name] = (string) $value;

        return $this;
    }
1002376
protected function getMultipleRawOptionValue($name, $value, $defaultValue)
    {
        $modelVariable = $this->getSingularVariable($this->modelName);
        $valueString = 'null';

        if (!is_null($value)) {
            $valueString = starts_with($value, '$') ? sprintf("%s", $value) : sprintf("'%s'", $value);
        }

        $defaultValueString = '[]';

        if (!empty($defaultValue)) {
            $joinedValues = implode(',', Helpers::wrapItems((array) $defaultValue));
            $defaultValueString = sprintf('[%s]', $joinedValues);
        }

        $accessor = $this->getDefaultValueAccessor($modelVariable, $name, $defaultValueString);

        return sprintf("in_array(%s, old('%s', %s) ?: [])", $valueString, $name, $accessor);
    }
324029
public function doCallback($name, array $values = array(), $getResult = false)
    {
        $values = array_merge(
            $values,
            array($name, $this)
        );

        if ($getResult) {
            $result = $values[0];
        }

        /*
         * Hook into Wordpress if wanted.
         */
        if ($this->getConfig('hookIntoWordpress') && class_exists('\WP')) {
            $result = call_user_func_array(
                ($getResult ? 'apply_filters' : 'do_action'),
                array_merge(
                    (array) sprintf('%s_%s', $this->_name, strtolower($name)),
                    $values
                )
            );
        }

        /*
         * Do own callbacks.
         */
        if (!empty($this->_callbacks[$name])) {
            foreach ($this->_callbacks[$name] as $prio => $callbacks) {
                foreach ($callbacks as $callbackKey) {
                    if (!empty(self::$_baseRealCallbacks[$callbackKey])) {
                        if ($getResult) {
                            $values[0] = $result;
                        }
                        $result = call_user_func_array(self::$_baseRealCallbacks[$callbackKey], $values);
                    }
                }
            }
        }

        return ($getResult ? $result : $this);
    }
448564
public function addPostParameter($name, $value)
    {
        if (!$this->hasGetPostParamValue($name, true))
        {
            $this->postParams[$name] = $value;
            return true;
        }
        else
        {
            return false;
        }
    }
640212
public static function postString($name, $default = null)
    {
        if (isset($_POST[$name]) && $_POST[$name] !== '') return self::parseInputToString($_POST[$name]);
        return $default;
    }
1149972
public void addParamQuery(String name, String value) {
        addParam(name, value, NameValuePair.TYPE_QUERY_STRING);
    }
1354799
private function getParam(string $name, string $default = null): ?string
	{
		return $this->request->getPost($name, $default);
	}
1145389
public function decode($value, $offset, $name)
    {
        if ($this->isDynamicArray($name)) {
            $arrayOffset = (int) Utils::toBn('0x' . mb_substr($value, $offset * 2, 64))->toString();
            $length = (int) Utils::toBn('0x' . mb_substr($value, $arrayOffset * 2, 64))->toString();
            $arrayStart = $arrayOffset + 32;

            $nestedName = $this->nestedName($name);
            $nestedStaticPartLength = $this->staticPartLength($nestedName);
            $roundedNestedStaticPartLength = floor(($nestedStaticPartLength + 31) / 32) * 32;
            $result = [];

            for ($i=0; $i<$length * $roundedNestedStaticPartLength; $i+=$roundedNestedStaticPartLength) {
                $result[] = $this->decode($value, $arrayStart + $i, $nestedName);
            }
            return $result;
        } elseif ($this->isStaticArray($name)) {
            $length = $this->staticArrayLength($name);
            $arrayStart = $offset;

            $nestedName = $this->nestedName($name);
            $nestedStaticPartLength = $this->staticPartLength($nestedName);
            $roundedNestedStaticPartLength = floor(($nestedStaticPartLength + 31) / 32) * 32;
            $result = [];

            for ($i=0; $i<$length * $roundedNestedStaticPartLength; $i+=$roundedNestedStaticPartLength) {
                $result[] = $this->decode($value, $arrayStart + $i, $nestedName);
            }
            return $result;
        } elseif ($this->isDynamicType()) {
            $dynamicOffset = (int) Utils::toBn('0x' . mb_substr($value, $offset * 2, 64))->toString();
            $length = (int) Utils::toBn('0x' . mb_substr($value, $dynamicOffset * 2, 64))->toString();
            $roundedLength = floor(($length + 31) / 32);
            $param = mb_substr($value, $dynamicOffset * 2, ( 1 + $roundedLength) * 64);
            return $this->outputFormat($param, $name);
        }
        $length = $this->staticPartLength($name);
        $param = mb_substr($value, $offset * 2, $length * 2);

        return $this->outputFormat($param, $name);
    }
143534
public function addDefaultQueryParameter($name, $value)
    {
        if (!isset($this->query[$name])) {
            $this->query[$name] = $value;
        }

        return $this;
    }