Magic setter to set a table field.

@param   string $key   The key name.
@param   mixed  $value The value to set.

@return  static

@since   2.0
@throws  \InvalidArgumentException
181601
public function set($key, $value = null)
    {
        $key = $this->resolveAlias($key);

        $mutator = 'set' . $this->toCamelCase($key) . 'Value';

        if (is_callable([$this, $mutator])) {
            $this->$mutator($value);
        } else {
            $this->data[$key] = $value;
        }

        return $this;
    }
694386
public function set($key, $value = null): self
    {
        if (is_array($key)) {
            // must be assoc array
            foreach ($key as $key => $value) {
                $_SESSION[$this->name][$key] = $value;
            }
        } else {
            $_SESSION[$this->name][$key] = $value;
        }

        return $this;
    }
350249
public function set($key, $value)
    {
        $this->checkWriteAccess();
        $this->_settings[$key] = $value;
        return $this;
    }
714182
function set($key, $value) {
        if(!$this->enabled) {
            return $this;
        }
        
        parent::set($key, $value);
        if($this !== $this->client->presences) {
            $this->client->presences->set($key, $value);
        }
        
        return $this;
    }
429846
public function set($key, $value = null)
    {
        if( is_array($key) ) {
            $this->values($key);
        } else {
            $this->value($key, $value);
        }
        return $this;
    }
171127
public function set(string $key, $value)
    {
        return Arr::set($this->meta, $key, $value);
    }
1279013
public function setParam(string $key, $value): Mapping
    {
        $this->_mapping[$key] = $value;

        return $this;
    }
899005
protected function setConfig($value, $key)
    {
        $setter = 'set' . ucfirst($key);

        if (method_exists($this, $setter)) {
            $this->$setter($value);
        } elseif (property_exists($this, $key)) {
            $this->$key = $value;
        }

        return $this;
    }
1151340
public function set($key, $value)
    {
        $allowed = array_diff(array_keys(get_class_vars(get_class($this))), $this->_hidden);
        if (empty($allowed) || !empty($allowed) && in_array($key, $allowed)) {
            if (method_exists($this, 'set' . ucfirst($key))) {
                call_user_func_array([$this, 'set' . ucfirst($key)], [$value]);
            } else {
                $this->{$key} = self::modelize($key, $value);
            }
        }

        return $this;
    }
1262954
public static function set(string $key, $value)
    {
        if (!in_array($key, self::$allowedKeys)) {
            throw new \InvalidArgumentException('Invalid key given');
        }

        self::$storedValues[$key] = $value;
    }
1110100
public function set($key, $value)
	{
		if ( !$value instanceof Cell )
		{
			throw new \InvalidArgumentException('Only Cells can be added to Rows');
		}

		parent::set($key, $value);
	}
635720
public function set($key, $value)
    {
        if (!\is_array($this->_data)) {
            throw new InvalidException('Document data is serialized data. Data creation is forbidden.');
        }
        $this->_data[$key] = $value;

        return $this;
    }
753049
public function set($key, $value = null){
        if(is_array($key)){
            $this->_dirty = $key;
        }
        else{
            $this->_dirty[$key] = $value;
        }
        
        return $this;
    }
49894
public function set($key, $value)
    {
        if (! $value instanceof AdapterInterface) {
            throw new InvalidArgumentException(
                'Adding an object that does not implement AdapterInterface '.
                'to AdaptersMap.'
            );
        }
        return parent::set($key, $value);
    }
902326
public function setValue($key, array $value, string $table)
    {
        $this->checkTable($table);

        $this->$table->set($key, ['value' => json_encode($value)]);

        return $this;
    }
412237
public function set($key, $value = null)
    {
        if (isset($value)) {
            $this->building[$key] = $value;
            return $this;
        }

        return new static($this->getSetCallback($key));
    }
419861
public static function set(string $name, string $key, $value)
    {
        return static::getInstance($name)->set($key, $value);
    }