Sets parameter.

@param string $name  Parameter name.
@param mixed  $value Parameter value.

@return self
@throws \LogicException When driver wasn't set upfront.
332709
protected function setParameter($name, $value)
	{
		if ( !isset($this->_driverFactory) ) {
			throw new \LogicException('Please set "driver" parameter first.');
		}

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

		return $this;
	}
106956
public function setOption($name, $value) {
    if (!array_key_exists($name, $this->options)) {
      throw new InvalidArgumentException(sprintf('Undefined option: "%s"', $name));
    }

    $this->options[$name] = $value;
    $this->getHttpClient()->setOption($name, $value);
  }
793908
public function addParam($name, $value): self
    {
        if (!isset($this->params[$name])) {
            $this->setParam($name, $value);
        }

        return $this;
    }
175946
protected function _set($name, $value)
    {
        $this->_data[$name] = $value;

        // Do not reload / save here:
        // 1: other changes might follow,
        // 2: it might not be used,
        // 3: e.g. database saves may change other data.
        $this->invalidateCache();

        return $this;
    }
1230541
private function setParameter($name, $value)
    {
        switch ($name) {

            case 'email':
                $this->email = (string) $value;
                break;

            default:
                throw new \InvalidArgumentException('Not allowed parameter: '.$name);
                break;
        }
    }
673212
public function set(string $name, $value = null): self
    {
        $this->variables[$name] = $value;
        return $this;
    }
230494
public function setOption($name, $value)
	{
		$this->assertOptionName($name);

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

		return $this;
	}
302181
public function setParameter($name, $value)
    {
        $config                      = $this->get('config');
        $config['parameters'][$name] = $value;

        $this->set('config', $config);
    }
843874
public function set($name, $value): self
    {
        if (!\is_array($value)) {
            $value = ['value' => (string)$value];
        }

        parent::set($name, \array_replace($this->defaults, $value));

        return $this;
    }
1256594
public function setSetting( string $name, $value ): self
	{
		if (in_array($name, self::SETTINGS_INIT_ONLY))
			throw new SettingsException("Settings option '$name' can only be set on initialization of the library.");

		$this->settings[$name] = $value;
		return $this;
	}
480302
public function setParameterGet($name, $value = null)
	{
		// Verifying if is array
		if (is_array($name)) {
			foreach ($name as $k => $v) {
				$this->setParameterGet($k,$v);
			}
		} else {
			$parray = &$this->paramsGet;
				
			if (is_null($value)) {
				if (isset($parray[$name])) unset($parray[$name]);
			} else {
				$parray[$name] = $value;
			}
		}
	
		return $this;
	}
376634
public function withArgument(string $name, $value) : self
    {
        $this->enqueueQueue->setArgument($name, $value);

        return $this;
    }
1324139
public static function set($name, $value = '', $prefix = '') {
        self::driver()->set($name, $value, $prefix);
    }
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;
	}
654643
public function setOption($name, $value = null)
    {
        // Set options
        if (is_array($name)) {
            foreach ($name as $k => $v) {
                $this->setOption($k, $v);
            }
            return $this;
        }

        if (method_exists($this, $method = 'set' . $name)) {
            return $this->$method($value);
        } else {
            $this->$name = $value;
            return $this;
        }
    }
198191
public function set(string $name, $value)
    {
        $this->config->set($name, $value);
        return $this;
    }
557893
public function setParameterGet($name, $value = null)
    {
        if (is_array($name)) {
            foreach ($name as $k => $v) {
                $this->_setParameter('GET', $k, $v);
            }
        } else {
            $this->_setParameter('GET', $name, $value);
        }

        return $this;
    }