设置参数的值
@param string $name 参数名
@param string $value 值
@throws \InvalidArgumentException
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;
    }
566365
public function setParam($name, $value=null) {
		if(is_array($name)) {
			foreach($name as $k=>$v)
				$this->setParam($k, $v);
			return $this;
		}
		$this->params[$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;
	}
204766
public function setAttribute( string $name, $value )
   {

      if ( ! $this->_supportedAttributes->has( $name ) )
      {
         // Unknown attribute
         throw new ArgumentException(
            'name', $name, 'Can not set the DB driver "' . $this->_type . '" not supports a attribute with this name!'
         );
      }

      if ( ! $this->_supportedAttributes->get( $name )->validateValue( $value ) )
      {
         // Invalid value
         throw new ArgumentException(
            'value', $value, 'Can not set the DB driver "' . $this->_type . '" attribute "' . $name .
                             '" value, because the value is invalid!'
         );
      }

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

      return $this;

   }
185520
public function set($name, $value)
    {
        $name = '_' . (string)$name;
        if (property_exists($this, $name) && (!is_array($this->$name))) {
            $this->$name = $value;
        }
        return $this;
    }
75918
public function setOption($name, $value)
    {
        if (! in_array($name, $this->validOptions)) {
            throw new Error('Invalid option ' . $name . '. Valid options are : ' . join(', ', $this->validOptions));
        }
        // Check duplicate fields in header
        if ('header' == $name) {
            $cnt = array_count_values($value);
            $duplicates = array();
            foreach ($cnt as $f => $c) {
                if ($c > 1) {
                    $duplicates[$f] = $c;
                }
            }
            if (sizeof($duplicates) > 0) {
                $msg = 'Duplicate fields found in header : ' . join(', ', array_keys($duplicates));
                throw new Error($msg);
            }
        }
        $this->$name = $value;

        return $this;
    }
498682
public function setProperty($name, $value)
    {
        if (!is_string($name)) {
            throw new InvalidArgumentException(sprintf('%s expects parameter 1 to be string, %s given', __METHOD__, (is_object($name) ? get_class($name) : gettype($name))));
        }

        if (!is_string($value)) {
            throw new InvalidArgumentException(sprintf('%s expects parameter 2 to be string, %s given', __METHOD__, (is_object($value) ? get_class($value) : gettype($value))));
        }

        $this->parseStyleAttribute();

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

        $this->updateStyleAttribute();

        return $this;
    }
1225644
public static function Set ($name, $value = null) {
		if (!is_array($name)) {
			$ini_set = [$name => $value];
		} else {
			$ini_set = $name;
		}

		$ret = [];
		foreach ($ini_set as $name => $value) {
			if (!static::Updatable($name)) {
				throw CoreException::RaiseSystemError('設定を変更できない設定値を渡されました。name:%s, value:%s', [$name, $value]);
			}
			$ret[$name] = ini_set($name, $value);
		}

		if (count($ret) === 1) {
			return current($ret);
		}

		return $ret;
	}
1101604
public function _set($name, $value)
    {
        $setMethod = 'set' . ucfirst($name);
        if (method_exists($this, $setMethod)) {
            $this->$setMethod($value);
        } else {
            throw new \InvalidArgumentException(sprintf('Setter does not exist for "%s" property', $name));
        }
        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;
        }
    }
200688
public function setValue($value)
    {
        if ('checkbox' === $this->type && false === $value) {
            // uncheck
            $this->value = null;
        } elseif ('checkbox' === $this->type && true === $value) {
            // check
            $this->value = $this->options[0]['value'];
        } else {
            if (is_array($value)) {
                if (!$this->multiple) {
                    throw new \InvalidArgumentException(sprintf('The value for "%s" cannot be an array.', $this->name));
                }

                foreach ($value as $v) {
                    if (!$this->containsOption($v, $this->options)) {
                        throw new \InvalidArgumentException(sprintf('Input "%s" cannot take "%s" as a value (possible values: %s).', $this->name, $v, implode(', ', $this->availableOptionValues())));
                    }
                }
            } elseif (!$this->containsOption($value, $this->options)) {
                throw new \InvalidArgumentException(sprintf('Input "%s" cannot take "%s" as a value (possible values: %s).', $this->name, $value, implode(', ', $this->availableOptionValues())));
            }

            if ($this->multiple) {
                $value = (array) $value;
            }

            if (is_array($value)) {
                $this->value = $value;
            } else {
                parent::setValue($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;
    }
485782
public function set($name, $value = null)
    {
        if (!is_array($name)) {
            $name = [$name => $value];
        }

        foreach ($name as $name => $value) {
            $name = self::normalizeName($name);
            $value = self::normalizeValue($value);

            $this->parameters[$name] = $value;
        }
    }
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;
        }
    }
1334996
public function offsetSet($name, $value)
	{
		if ($name === null)
		{
			throw new InvalidArgumentException('The argument name cannot be null.');
		}

		$this->setArgument($name, $value);
	}
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;
    }
786347
public function offsetSet($name, $value)
    {
        if (is_null($name)) {
            throw new \InvalidArgumentException('The key name cannot be null.');
        }

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