Adds a parameter

@param string $name
@param mixed  $value

@return $this

@throws \Thuata\ComponentBundle\Exception\InvalidParameterTypeException
502304
public function addParameter(string $name, $value)
    {
        if (!is_scalar($value)) {
            throw new InvalidParameterTypeException(__CLASS__, __METHOD__, 1, 'scalar', gettype($value));
        }

        $this->parameters->set($name, $value);

        return $this;
    }
586983
public function bindParams($name, $value=null) {
        
        if (is_array($name)) {
            foreach ($name as $k=>$v) {
                $this->binds[':'.$k]  =   $v;
            }
        } elseif ($value) {
            $this->binds[':'.$name] = $value;
        }
        
        return $this;
    }
647712
public function add($name, $value)
    {
        $this->arguments[] = '--add';
        $this->arguments[] = $name;
        $this->arguments[] = $value;
        return $this;
    }
518074
public function addVarAttr($name, $value)
    {
        if (!in_array($name, $this->varAttr)) {
            $this->varAttr[$name] = $value;
        }
        return $this;
    }
279175
public function withAddedParameter($name, $value)
    {
        $new = clone $this;
        $new->parameters[$name] = $new->hasParameter($name)
            ? array_merge((array) $new->parameters[$name], (array) $value)
            : $value;

        return $new;
    }
932980
public function setRequestParam(string $name, $value): self
    {
        $this->_requestParams[$name] = $value;

        return $this;
    }
1047228
protected function populate($name, $value)
    {
        switch ($name) {
            case 'port':
                if (!is_int($value)) {
                    throw new InvalidArgumentException('Value given to set "'.$name.'" must be a valid int!!');
                }
                if (isset(self::$defaultPorts[$this->scheme]) && $value == self::$defaultPorts[$this->scheme]) {
                    break;
                }
                $this->$name = $value;
                break;
            case 'host':
                if (strpos($value, ':') !== false) {
                    $tmp = explode(':', $value);
                    $this->port((int)$tmp[1]);
                    $value = $tmp[0];
                }
                //Just extract port then go to the default case
            default:
                if (!is_string($value)) {
                    throw new InvalidArgumentException('Value given to set "'.$name.'" must be a valid string!!');
                }
                $this->$name = $value;
                break;
        }
    }
1106576
public function add($name, $value)
    {
        if ($this->has($name)) {
            $this->updateAttribute($name, $value);
        }
        else {
            $this->makeAttribute($name, $value);
        }

        return $this;
    }
100774
public function setParam($name, $value)
	{
		if (null === $this->params)
		{
			$this->params = $this->loadParams();
		}

		$this->params->set($name, $value);

		return $this;
	}
1169471
public function addGet($name, $value = null)
    {
        if (is_array($name) && $value === null) {
            $this->getParams = array_merge($this->getParams, $name);
        } else {
            $this->getParams[$name] = $value;
        }

        return $this;
    }
1058140
public function setParam($name, $value): self
    {
        if (null === $name) {
            throw new \InvalidArgumentException('The argument name cannot be null.');
        }

        $this->params[$name] = $value;

        return $this;
    }
462351
public function setPathParameter($name, $value) {
		
		// check whether path parameter $name exists

		if(empty($this->placeholders)) {
			throw new \InvalidArgumentException(sprintf("Unknown path parameter '%s'.", $name));
		}
		
		$found = false;

		foreach($this->placeholders as $placeholder) {
			if($placeholder['name'] === $name) {
				$found = true;
				break;
			}
		}

		if(!$found) {
			throw new \InvalidArgumentException(sprintf("Unknown path parameter '%s'.", $name));
		}
		
		$this->pathParameters[$name] = $value;

		return $this;
	}
39035
public function withParameter($name, $value) {

            $query = clone $this;
            $query->setParameter($name, $value);

            return $query;

        }
184575
public function setArgument($name, $value) {
        if (!$this->definition->hasArgument($name)) {
            throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
        }

        $this->arguments[$name] = $value;
    }
86220
public function addHeader(string $name, string $value) : self
    {
        $name = $this->normalizeHeader($name);
        if (isset($this->headers[$name])) {
            throw new \InvalidArgumentException(
                sprintf("Header %s is already set with value '%s'", $name, $this->headers[$name])
            );
        }

        $this->headers[$name] = $value;

        return $this;
    }
33208
public function & SetParam ($name = '', $value = '') {
		/** @var $this \MvcCore\Request */
		if ($this->params === NULL) $this->initParams();
		$this->params[$name] = $value;
		return $this;
	}
686808
public function addHeader($name, $value = null)
    {
        if (is_numeric($name)) {
            $status = $this->getStatus($name);
            if (!empty($status)) {
                $this->headers[] = "{$_SERVER['SERVER_PROTOCOL']} $name $status";
            }
        } elseif (isset($value)) {
            $this->headers[] = "$name: $value";
        }

        return $this;
    }