[set description]

@param [type] $key   [description]
@param [type] $value [description]

@return [type] [description]

@deprecated
349689
public function set($key, $value)
    {
        trigger_error(__METHOD__.' is deprecated.', E_USER_DEPRECATED);

        return $this->data($key, $value);
    }
223029
public function set($key, $value)
    {
        if (null === $value) {
            return $this->remove($key);
        }
        $this->clearRemoval($key);

        $original = $this->getOriginal($key);

        if ($value instanceof \stdClass && $original instanceof \stdClass) {
            if ($value == $original) {
                $this->clearChange($key);
            } else {
                $this->current[$key] = $value;
            }
            return $this;
        }

        if ($value === $original) {
            $this->clearChange($key);
        } else {
            if (($value instanceof \DateTime && $original instanceof \DateTime) && ($value->getTimestamp() === $original->getTimestamp())) {
                $this->clearChange($key);
            } else {
                $this->current[$key] = $value;
            }
        }
        return $this;
    }
1175722
public function set($key, $value)
	{
		$this->data[$key] = $this->close($value);

		return $this;
	}
171127
public function set(string $key, $value)
    {
        return Arr::set($this->meta, $key, $value);
    }
698147
public function set($key, $value = null)
    {
        $data = is_array($key) ? $key : [$key => $value];
        $obj = self::instance();
        $obj->fill($data);
        return $obj->save();
    }
177165
public function set($value, $key = null)
    {
        if (is_null($key)) {
            $this->registry[] = $value;
        } else {
            $this->registry[$key] = $value;
        }
        return $this;
    }
1195556
public function map( $key, $value = null )
    {
        Option::set( $this->_map, $this->_hashKey( $key ), $value );

        return $this;
    }
19913
public function set($key, $value)
    {
        $keys = explode('.', $key);

        $data = &$this->parameters;

        while (count($keys) > 1) {
            $pkey = $keys[0];

            if (!array_key_exists($pkey, $data) || !is_array($data[$pkey])) {
                $data[$pkey] = [];
            }

            $data = &$data[$pkey];
            array_shift($keys);
        }

        $data[$keys[0]] = $value;

        return $this;
    }
104130
public static function set($key, $value)
    {
        if (isset(static::$env->$key)) {
            return static::$env->$key = $value;
        }

        return putenv(Str::upper($key) . '=' . $value);
    }
376335
public function setAttribute($key, $value)
    {
        if ($this->hasSetMutator($key)) {
            $method = 'set' .Str::studly($key) .'Attribute';

            return call_user_func(array($this, $method), $value);
        } else if (in_array($key, $this->getDates()) && $value) {
            $value = $this->fromDateTime($value);
        }

        $this->attributes[$key] = $value;
    }
444083
public function set(string $key, $value = null)
    {
        return Arr::set($this->items, $key, \value($value));
    }
1262582
public function set($key, $value) {
		
		$previous = $this->get($key);
		
		parent::set($key, $value);
		
		return $previous;
	}
590753
public function set($key, $value) {
        if ($key) {
            $this->_data[$key] = $value;
        } else {
            $this->_data = $value;
        }
        $this->_modified = true;
        return $this;
    }
1233146
public function set( $key, $value ) {
		$this->reload_options();
		$suspend_reload         = $this->_suspend_reload;
		$prev                   = isset( $this->_options[ $key ] ) ? $this->_options[ $key ] : null;
		$this->_options[ $key ] = $value;
		if ( $prev !== $value ) {
			$this->_suspend_reload = true;
			$this->do_action( 'changed_option', $key, $value, $prev );
			$this->_suspend_reload = $suspend_reload;
		}

		return $this->save();
	}
570120
public function set($key, $value)
    {
        if (is_array($key) && $value === null)
            $args = $key;
        else
            $args = func_get_args();

        $path = $args;
        $value = array_pop($path);
        $type = $this->types->dget($path);
        $kpath = implode('.', $path);

        // Key is undefined, but it may be in a untyped sub-array
        if ($type === null)
        {
            $cpy = $path;
            while (count($cpy))
            {
                $last = array_pop($cpy);
                $subtype = $this->types->dget($cpy);
                if ($subtype instanceof Validator && $subtype->getType() === Type::ARRAY)
                    return parent::set($args, null);
            }
        }

        if ($type === null)
            throw new \InvalidArgumentException("Undefined key: " . $kpath);

        if ($type instanceof Dictionary)
        {
            // Subfiltering required - extract values
            if (!Functions::is_array_like($value))
                throw new \InvalidArgumentException("Value must be array at: " . $kpath);

            foreach ($value as $subkey => $subval)
            {
                $nargs = $path;
                $nargs[] = $subkey;
                $nargs[] = $subval;
                $this->set($nargs, null);
            }
            return;
        }

        if (!$type->validate($value))
        {
            $error = $type->getErrorMessage($value);
            $msg = WF::fillPlaceholders($error['msg'], $error['context'] ?? []);
            throw new \InvalidArgumentException($msg);
        }

        return parent::set($args, null);
    }
137778
protected function setCast($key, $value)
    {
        if (is_null($value)) {
            return $value;
        }

        $type   = $this->getCastType($key);
        $method = 'setCast' . Str::studly($type) . 'Type';

        if (method_exists($this, $method)) {
            return $this->$method($key, $value);
        }

        return $value;
    }
1316827
public function set($key, $value)
    {
        $this->data[$key] = $value;
        $this->version++;
        
        return $this;
    }