Set data.

@param FieldInterface|SubfieldInterface|string $key   Datas spec
@param bool|null                               $value The data
547244
protected function setData($key, $value)
    {
        $this->data[$key] = (is_array($value)) ? $value : [$value];
    }
123137
public function set( $key, $value, $param = null ) 
	{
	    CCArr::set( $key, $value, $this->_data );
	}
1113064
static function set( $key, $value ) {
        $me = self::getInstance();
        $me->parameters[$key] = $value;
    }
702436
public function setBoth($key, $value = null): void
    {
        $this->_controller->set($key, $value);
        $this->setJson($key, $value);
    }
682144
public function setAttribute($key, $value = null)
    {
        if ($key === 'name' && stristr($value, $this->getMultiValueSuffix()) !== false) {
            $this->setMultiValue(true);
        }

        parent::setAttribute($key, $value);
    }
1023566
public function set($key, $value = null)
    {
        try {
            $this->table()->insert(compact('key', 'value'));
        } catch (Exception $e) {
            $this->table()->where('key', '=', $key)->update(compact('value'));
        }
    }
989400
public function set($key, $value = null)
    {
        return self::setValue($this->data, $key, $value);
    }
1296344
public function setData($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $key => $value) {
                if (!is_array($value) && !is_object($value)) {
                    $value = $this->stripInvalidUnicodeSequences(
                        $this->stringToUtf8(
                            $value,
                            ShopgateObject::$sourceEncodings
                        )
                    );
                }
                $this->$key = $value;
            }
        } else {
            if (!is_array($value) && !is_object($value)) {
                if (!is_null($value)) {
                    $value = $this->stripInvalidUnicodeSequences(
                        $this->stringToUtf8(
                            $value,
                            ShopgateObject::$sourceEncodings
                        )
                    );
                }
            }
            $this->$key = $value;
        }

        return $this;
    }
143806
public function set($key, $value) {
        $this->checkReadOnly();
        self::setFromKey($this->data, $key, $value, $this->separator);
    }
1031573
public function set($key, $value=null)
    {
        if (is_array($key)) {
            $this->data = array_merge($this->data, $key);
        } elseif ($key instanceof Collection) {
            $this->set($key->all());
        } elseif (is_scalar($key)) {
            $this->data[$key] = $value;
        }
        
        return $this;
    }
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;
    }
230551
public function setValue($key, $value) {
		if( !isset($key) ) {
			// Invalid key
			throw new Exception("nullKey");
			
		} else if( !in_array($key, static::$fields) ) {
			// Unknown key
			throw new FieldNotFoundException($key, static::getClass());
			
		} else if( $key === static::$IDFIELD ) {
			// ID is not editable
			throw new Exception("idNotEditable");
			
		} else if( $value !== $this->data[$key] ) {
			// The value is different
			$this->addModFields($key);
			$this->data[$key] = $value;
		}
		return $this;
	}
851871
public function offsetSet($key, $value)
    {
        $key = strtr(strtolower($key), '_', '-');

        $this->_data[$key] = $value;
    }
599155
public function set(string $key, $value)
    {
        if (!isset($this->data[$this->activeAssetSourceIdentifier])) {
            $this->initializeData($this->activeAssetSourceIdentifier);
        }
        $this->data[$this->activeAssetSourceIdentifier][$key] = $value;
    }
137180
protected function setViewData($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $name => $data) {
                view()->share($name, $data);
            }
        } else {
            view()->share($key, $value);
        }
    }
1000107
public function set(string $key, $value)
    {
        if (!is_array($value)) {
            $value = [$value];
        }
        $this->normSet($key, $value);
    }
974785
public function __setter($key, $value)
    {
        if(isset($this->ignoreData[$key])){

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

        }else{

            $attrs = $this->getAttrs();

            if (isset($attrs[$key]) && isset($attrs[$key]['type']) ) {
                if (in_array($attrs[$key]['type'], array(self::DATA_TYPE_REFERENCE, self::DATA_TYPE_REFERENCES))) {
                    $value = $this->setRef($key, $value);
                } elseif (in_array($attrs[$key]['type'], array(self::DATA_TYPE_EMBED, self::DATA_TYPE_EMBEDS))) {
                    $value = $this->fillEmbed($key, $value);
                }
            }

            $value = $this->parseValue($key, $value, $this->getAttrs());

            if ( !isset($this->ignoreData[$key]) && ( !isset($this->cleanData[$key]) || $this->cleanData[$key] !== $value )) {
                $this->cleanData[$key] = $value;
                $this->dirtyData[$key] = $value;
            }

        }

    }