更新发送状态

@param string|array $name
@param mixed        $value
358332
public function updateState($name, $value = null)
    {
        $state = $this->retrieveState();
        if (is_array($name)) {
            $state = array_merge($state, $name);
        } elseif (is_string($name)) {
            $state[$name] = $value;
        }
        $key = $this->generateKey(self::STATE_KEY);
        self::storage()->set($key, $state);
    }
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;
    }
550517
protected static function set(string $name, string $value): void
    {
        $name = \trim($name);

        if (
            (isset($name[0]) && $name[0] === '#') ||
            (static::$immutable && static::get($name) !== null)
        ) {
            return;
        }

        static::$names[] = $name;
        $value = \trim($value);

        // If PHP is running as an Apache module and an existing
        // Apache environment variable exists, overwrite it
        if (
            \function_exists('\\apache_setenv') &&
            \function_exists('\\apache_getenv') &&
            \apache_getenv($name) !== false
        ) {
            \apache_setenv($name, $value);
        }

        if (\function_exists('\\putenv')) {
            \putenv("$name=$value");
        }

        $_ENV[$name] = $value;
        $_SERVER[$name] = $value;
    }
342494
public function setAttribute(string $name, $value): void
	{
		Arr::set($this->attributes, $name, $value);
	}
47057
public function SetAttribute($Name, $Value = '') {
      if (!is_array($Name))
         $Name = array($Name => $Value);

      foreach($Name as $Key => $Val) {
         if ($Val === NULL)
            unset($this->_Attributes[$Key]);
         $this->_Attributes[$Key] = $Val;
      }
   }
1008667
public function update( string $name, $value ) {
		if ( get_field( $name, 'option') ) {
			return update_field( $name, $value, 'option');
		} elseif ( get_option( $name ) ) {
			return update_option( $name, $value );
		}
		
		return FALSE;
	}
603757
public function set($name, $value = null)
    {
        if (is_array($name)) {
            foreach ($name as $k => $v) {
                $this->set($k, $v);
            }
        } else {
            if (is_callable($value)) {
                $this->dynamic[$name] = $value;
            } else {
                $this->properties[$name] = $value;
            }
        }
    }
448445
public function setAttribute($name, $value = null)
    {
        if (is_array($name)) {
            foreach ($name as $k => $v) {
                $this->attributes[$k] = $v;
            }
        } else {
            $this->attributes[$name] = $value;
        }
    }
569457
public function set($name, $value = null)
    {
        $values = is_array($name) ? $name : [$name => $value];
        foreach ($values as $name => $value) {
            $this->itemSetting[$name] = $value;
        }

        unset($this->items[$name]);
    }
1179361
public function set($name, $value)
    {
        $this->_vars[$name] = is_object($value) ? $value->fetch() : $value;
    }
622027
protected function setAttrVal($name, $value)
    {
        // 数据保护，启用数据独立的模型，不允许重新加载数据
        if ($this->isInstanceApart && $this->isLoaded()) {
            $pk = $this->getPk();
            if((is_array($pk) && array_key_exists($name, $pk) && $this->getPkv()[$name] != $value)
                || (is_scalar($pk) && strtolower($name) == strtolower($pk) && $this->getPkv() != $value)) {
                $msg = "The primarykey '{$name}' is readonly, if you are going to change it in any case, "
                    . "you must new another instance of " . get_class($this) . " or set the 'isInstanceApart' property as false.";
                throw new Exception($msg);
            }
        }

        // 表字段有对应已定义模型类属性
        if($this->columnMap && array_key_exists($name, $this->columnMap)) {
            $attr = $this->columnMap[$name];
            $setter = 'set' . $attr;

            if(method_exists($this, $setter)) {
                $this->$setter($value);
            } else {
                $this->$attr = $value;
            }

            return $this;
        } else if (property_exists($this, $name)) {
            // 重载元素时存在同名已声明私有属性名无映射不允许重载赋值
            throw new \InvalidArgumentException('access non public property on __get():' . get_class($this) . '::' . $name);
        } else {
            $this->attrs[$name] = $value;
        }

        return $this;
    }
1073
public function set($name, $value = null)
    {
        if (is_array($name)) {
            $this->parameters = array_replace($this->parameters, $name);
        } else {
            $this->parameters[trim(strtolower($name))] = is_string($value) ? trim($value) : $value;
        }
    }
640929
public function update($name, $value)
    {
        /** @var SettingRepository $repository */
        $repository = app(SettingRepository::class);
        $repository->updateByBundle($this, $name, $value);
    }
583775
public function addField(string $name, string $value) : void
    {
        $this->fields[$name][] = $value;
    }
938108
public function add(string $name, $value)
    {
        switch ($name) {
            case 'alg':
                $this->setAlgorithm($value);
                break;
            default:
                $this->headers[$name] = $value;
                break;
        }
    }
832806
private function updateAttribute($name, $value)
    {
        $attribute = $this->getAttr($name);

        if (! is_null($attribute)) {
            $attribute->addContent($value);

            $this->put($name, $attribute);
        }

        return $this;
    }
619259
public function setValue($name, $value)
    {
        // handle field
        if (static::fieldExists($name)) {
            $this->_setFieldValue($name, $value);
        }
        // undefined
        else {
            return false;
        }
    }