属性添加
@param string $name
@param string $value
@return $this
547987
public function addAttr($name, $value)
    {
        $name = trim($name);
        $value = trim($value);

        if ($value && !$this->existsAttr($name)) {
            $this->attrs[$name] = $value;
        }

        return $this;
    }
517435
public function set($name, $value = null)
	{
		is_null($name) or \Arr::set($this->data, $name, $value);

		return $this;
	}
313144
public function addAttribute($name, $value = '')
    {
        $org = $this->getAttribute($name);
        if ($org) {
            $value = trim($org . $value);
        }
        $this->attributes[$name] = $value;
        return $this;
    }
651246
public function withAddedHeader($name, $value): self
    {
        $request = clone $this;
        $request->headers->set($name, $value, false);

        return $request;
    }
110058
public function addHeader(string $name, $value) : Message
    {
        $name = strtolower($name);

        if (is_array($value)) {
            $value = array_values($value);
            $this->headers[$name] = isset($this->headers[$name])
                ? array_merge($this->headers[$name], $value)
                : $value;
        } else {
            $this->headers[$name][] = $value;
        }

        return $this;
    }
581218
final public function set(string $name, $value)
    {
        $this->container->setParameter($name, static::processValue($value, true));

        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;
    }
15015
public function addHeaderIfNotExist(string $name, string $value) : self
    {
        $name = $this->normalizeHeader($name);
        if (isset($this->headers[$name])) {
            return $this;
        }

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

        return $this;
    }
876160
protected function addHeader($name, $value)
    {
        $name  = $this->prepareHeaderName($name);
        $value = $this->prepareHeaderValue($value);

        $normalized = strtolower($name);
        if (! isset($this->headerNames[$normalized])) {
            $this->headerNames[$normalized] = $name;
        }

        $header = $this->headerNames[$normalized];

        if (isset($this->rawHeaders[$header])) {
            $this->rawHeaders[$header] = array_merge(
                $this->rawHeaders[$header],
                $value
            );

            return $this;
        }
        $this->rawHeaders[$header] = $value;

        return $this;
    }
630507
public function add($name, $value = null, $where = '')
    {
        if (!$this->has($name)) {
            $this->set($name, $value, $where);
        }

        return $this;
    }
1150344
public function addAttributes($name, $value)
    {
        if (empty($this->attributes[$name]))
            $this->attributes[$name] = [];

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

        return $this;
    }
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;
    }
367379
public function withHeader(string $name, $value): Builder
    {
        $this->headers[$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;
    }
978089
public function add(string $name, array $value)
    {
        $this->config->add($name, $value);
        return $this;
    }
559800
public function add(string $name, $value = null): ConfigInterface
    {
        $name = mb_strtolower($name);

        // Check if key is certificate or push, or classic parameter
        if (\in_array($name, self::CERTS, true)) {
            $this->addCert($name, $value);
        } elseif ($name === 'push') {
            $this->addPush($value);
        } else {
            $this->_params[$name] = $this->isBool($value);
        }

        return $this;
    }
1314324
public function add(string $name, string $value): HeaderCollection
    {
        $name = trim(strtolower($name));
        if (!array_key_exists($name, $this->headers)) {
            $this->headers[$name] = new Header($name);
        }
        $this->headers[$name]->addValue($value);
        return $this;
    }