Set Id
@param array $value
@throws InvalidIdException
170843
protected function setIdAttr(Array $value)
    {
        if (!is_null($value)) {
            foreach ($value as $id) {
                if (!preg_match('/^[0-9]+$/D', $id)) {
                    throw new InvalidIdException('Invalid id: ' . $id);
                }
            }
        }

        $this->id = $value;
    }
41637
public function setId($id)
    {
        if (is_integer($id) || is_float($id)) {
            $this->id = $id;
        } else {
            throw new InvalidArgumentException();
        }
    }
414308
public function setTopic($value)
    {
        $this->assertValidString($value, false);
        if ($value === '') {
            throw new \InvalidArgumentException('The topic must not be empty.');
        }

        $this->topic = $value;
    }
846700
protected function _set($key, $value)
    {
        if (!is_string($key)) {
            throw new Exception\InvalidArgumentException(
                "Key must be a string or a number: '$key' given"
            );
        }
        $this->_data[$key] = $value;
    }
880422
public function setValue($value)
    {
        if (is_array($value)) {
            $value = implode(', ', $value);
        }

        if (!is_null($value)) {
            $this->_value = $value;
            $this->appendChild($value);
        }
    }
1170627
public function set($key, $value)
    {
        if (!is_scalar($value) && !is_array($value)) {
            $msg = 'Value has to be a scalar or an array, but is '.gettype($value).'.';
            throw new InvalidArgumentException($msg);
        }

        $this->values[$key] = $value;

        return $this;
    }
245840
public function setIds(array $ids): void
    {
        if (empty($ids)) {
            throw new \InvalidArgumentException('At least one ID must be specified');
        }

        foreach ($ids as $id) {
            if (!\is_int($id)) {
                throw new \InvalidArgumentException('All IDs must be integers');
            }
        }

        $this->ids = $ids;
    }
274229
public function add($identifier, $value)
    {
        if (array_key_exists($identifier, $this->variables)) {
            throw new InvalidVariableException('Duplicate variable declaration, "' . $identifier . '" already set!', 1224479063);
        }
        if (in_array(strtolower($identifier), self::$reservedVariableNames)) {
            throw new InvalidVariableException('"' . $identifier . '" is a reserved variable name and cannot be used as variable identifier.', 1256730379);
        }
        $this->variables[$identifier] = $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;
    }
98753
public function setGroupId($value)
    {
        $this->_validateNotNull('GroupId', $value);
        $this->_validateInt('GroupId', $value);

        if ($this->data['group_id'] === $value) {
            return;
        }

        $this->data['group_id'] = $value;

        $this->_setModified('group_id');
    }
536131
public function offsetSet($offset, $value): void
    {
        if ($this->isValidEntity($value)) {
            if (is_null($offset) || mb_strlen($offset) == 0) {
                $this->list[] = $value;
            } else {
                $this->list[$offset] = $value;
            }
        } else {
            throw new \InvalidArgumentException(sprintf('This collection does\'t accept this entity "%s"', gettype($value)));
        }
    }
540067
public function setDefaultValue($value)
    {
        if (!is_array($value)) {
            throw new \InvalidArgumentException($this->getPath().': the default value of an array node has to be an array.');
        }

        $this->defaultValue = $value;
    }
275809
public function offsetSet($offset, $value)
    {
        /**
         * @var UniqueIdentity $value
         */
        $this->elements->offsetSet($value->uId()->id(), $value);
    }
180132
public function setValue($value) {
		if ($value instanceof \ArrayObject)
			$this->value = $value->getArrayCopy();
		elseif (is_object($value))
			$this->value = get_object_vars($value);
		elseif (is_array($value))
			$this->value = $value;
		else
			throw new \InvalidArgumentException("Method 'setValue' expected an object or array value");
		
		return $this;
	}
1258086
public function setAccountId($value)
    {
        if ($value === null || $value === '') {
            $this->_accountId = null;
        } elseif (TypeCast::canCastToString($value)) {
            $this->_accountId = (string)$value;
        } else {
            throw new \InvalidArgumentException('Invalid account_id value type "' . gettype($value) . '"');
        }
    }
562034
public function set($key, $value)
    {
        if (!is_array($value)) {
            throw new InvalidValueException(['the settings of `:key` key value must be array', 'key' => $key]);
        }

        $redis = is_object($this->_redis) ? $this->_redis : $this->_getRedis();
        $redis->set($this->_prefix . $key, json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));

        return $this;
    }
182757
public function setPrimaryKey($value)
    {
        if (!$this->primaryKey) {
            throw InvalidOperationException::methodCall(__METHOD__, 'Table does not have a primary key');
        }

        $this->columnData[$this->primaryKey] = $value;
    }