Merge parameters
@param string $name
@param mixed $value

@return mixed
556072
private function _merge($name, $value)
    {
        if (is_array($name)) {
            $config = $this->_get($name);
            if (is_array($config)) {
                $value = ArrayHelper::merge($config, $value);
            }
        }
        return $value;
    }
1064875
public function withParameter(string $name, ?string $value): self
    {
        if ($value !== null) {
            $this->parameters[$name] = $value;

        } else {
            unset($this->parameters[$name]);
        }

        return $this;
    }
611407
public function mergeNameAndAlias(array $args, $name, $alias) {
        if ( ! $name && ! $alias) {
            return $args;
        }

        $namedValues = array_take($args, $name);
        $aliasedValues = array_take($args, $alias);

        if ($namedValues === null && $aliasedValues === null) {
            return $args;
        }

        if ( ! is_array($namedValues)) {
            $namedValues = [];
        }

        if ( ! is_array($aliasedValues)) {
            $aliasedValues = [];
        }

        $mergedValues = array_merge($namedValues, $aliasedValues);

        if ($name) {
            array_set($args, $name, $mergedValues);
        } else {
            array_set($args, $alias, $mergedValues);
        }

        return $this->mergeNameAndAliasCount($args, $name, $alias);
    }
246554
public function addFormParam($name, $value)
    {
        $this->options[GuzzleRequestOptions::FORM_PARAMS][$name] = $value;

        return $this;
    }
1343390
public function add($name, $value = null)
    {
        if (empty($name)) {
            return $this;
        }

        $params = (!is_array($name) ? array($name => $value) : $name);

        $query = $this->query(true);

        foreach ($params as $key => $val) {
            if (empty($val)) {
                unset($query[$key]);
            } elseif (!empty($val)) {
                $query[$key] = $val;
            }
        }

        $query              = http_build_query($query);
        $this->url['query'] = $query;

        return $this;
    }
767180
public function value( $name, $value = null )
    {
        if ( is_array( $name ) ) {
            $this->values += $name;
        } elseif ( func_num_args() > 1 ) {
            $this->values[ $name ] = $value;
        }
        return $this;
    }
992619
protected function castConfigValue($name, $value)
	{
		foreach ($this->configTypes as list($nameRegexp, $valueRegexp, $methodName))
		{
			if (preg_match($nameRegexp, $name) && preg_match($valueRegexp, $value))
			{
				return $this->$methodName($value);
			}
		}

		return $value;
	}
996655
public function setParam($name, $value) {
		$this->payload['params'][$name] = Trustly_Data::ensureUTF8($value);
		return $value;
	}
941542
public static function get($name, $value = NULL)
    {
        return isset($_GET[$name]) ? $_GET[$name] : $value;
    }
1337430
public function merge($key, $value)
    {
        if (is_array($value) && is_array($old = $this->get($key))) {
            $value = array_merge_recursive($old, $value);
        }

        return $this->set($key, $value);
    }
129490
public function setHeader($name, $value) {
        if (!is_string($name))                   throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name));
        if (!strlen($name))                      throw new InvalidArgumentException('Invalid argument $name: '.$name);
        if (isset($value) && !is_string($value)) throw new IllegalTypeException('Illegal type of parameter $value: '.gettype($value));

        $name  = trim($name);
        $value = trim($value);

        // drop existing headers of the same name (ignore case)
        $existing = \array_intersect_ukey($this->headers, [$name => '1'], 'strCaseCmp');
        foreach ($existing as $key => $v) {
            unset($this->headers[$key]);
        }

        // set new header if non-empty
        if (!empty($value)) {
            $this->headers[$name] = $value;
        }
        return $this;
    }
287735
public function option($name, $value = '')
    {
        if (is_array($name)) {
            $this->option = array_merge($this->option, $name);
        } else {
            $this->option[$name] = $value;
        }

        return $this;
    }
282209
protected function setData($name, $value = null)
    {
        if (is_array($name)) {
            $this->data = array_merge($this->data, $name);
        }
        elseif (is_string($name)) {
            $this->data[$name] = $value;
        }

        return $this;
    }
355307
public static function get( $name = '', $value = '' ) {

		if ( ! empty( $value ) ) {
			$_GET[ $name ] = $value;
		}

		if ( empty( $name ) ) {
			return $_GET;
		} else {
			return ( isset( $_GET[ $name ] ) ) ? $_GET[ $name ] : NULL;
		}

	}
1363078
public function add_param($name, $value, $id = null) {
        if (!$id) {
            $id = $name;
        }
        $this->params[] = [
            'name' => $name,
            'value' => $value,
            'id' => $id
        ];
    }
210954
public function set($name, $value) {
		\Asgard\Common\ArrayUtils::set($this->parameters, $name, $value);
		return $this;
	}
980491
public function set($name, $value = null)
    {
        if (is_array($name))
        {
            // 如果传入数组就合并当前数据
            $this->data = ArrayUtil::recursiveMerge($this->data, $name);
        }
        else
        {
            // 设置数据
            $this->data[$name] = $value;
        }
        return true;
    }