Setter for metadata

@param string $key
@param mixed $value
978365
public function setMetadata($key, $value)
    {
        if (is_null($this->metadataCache))
        {
            $this->metadataCache = [];
        }

        $this->metadataCache[$key] = $value;
    }
376967
@Override
    public final void setMetadataProperty(final String key, final String value) {
        _metadataProperties.put(key, value);
    }
137704
public function withAddedMetadata(string $key, $value): Message
    {
        Assertion::notEmpty($key, 'Invalid key');

        $message = clone $this;

        $message->metadata[$key] = $value;

        return $message;
    }
1069343
public function setMetadataValues($values)
    {
        foreach ($values as $name => $value) {
            $this->metadata[$name] = $value;
        }
    }
1357525
public function set($key, $value) {
		if (null === $key) {
			$this->_data[] = $value;
		} else {
			$this->_data[$key] = $value;
		}
	}
797194
public function setMeta($name, $value){

        $meta = $this->meta;

        $meta = array_set($meta, $name, $value);

        $this->meta = json_encode($meta);

        $this->save();

        return $this->meta;
    }
426439
public function setMeta($key, $value = null)
    {
        $setMeta = 'setMeta'.ucfirst(gettype($key));

        return $this->$setMeta($key, $value);
    }
213157
public function set($key, $value)
    {
        $keys = explode('.', $key);
        $key_string = '';
        foreach ($keys as $i => $_key) {
            $key_string = $key_string . ((is_numeric($_key) || $_key === '') ? "[{$_key}]" : "['{$_key}']");
        }
        $script = sprintf('$this->_params%s = $value;', $key_string);
        eval($script);
    }
288625
public function setSettingsValue($key, $value)
    {
        if ($this->isKeyAllowed($key)) {
            return;
        }

        $this->fieldValues[$key] = $value;
    }
1299587
public void setMetadata(String key, Object value) {
        if (value != null) {
            getMetadata().put(key, value);
        }
    }
417366
public function set($key, $value)
    {
        $this->getSettingOrFail($key);

        $this->backend->setSetting($key, $value);
    }
904043
def set_metadata(self, key: str, value: str):
        
        if not isinstance(key, str) or not isinstance(value, str):
            raise TypeError("'key' and 'value' of metadata MUST be strings")
        self.metadata[key] = value
1081980
public function set($key, $value)
    {
        $key = trim($key, '.');
        if (strpos($key, '.') !== false) {
            $array =& $this->_items;
            foreach (explode('.', $key) as $v)
                $array =& $array[$v];
            $array = $value;
        } else {
            $this->_items[$key] = $value;
        }
    }
1200298
public function setMeta(string $key, $value): ContextBuilder
    {
        $this->metas[$key] = $value;

        return $this;
    }
1147301
public function setValue($key, $value)
    {
        $this->loadSettingsIfNotDoneYet();

        $this->isDirty = true;
        $this->settingsValues[$key] = $value;
    }
673370
public function set_metadata($name, $value) {
        $firststep = $this->get_step(0);
        if (!$firststep->has_metadata_var($name)) {
            $this->observer->notify_metadata_added($this, $name);
        } else if ($value !== $firststep->get_metadata_var($name)) {
            $this->observer->notify_metadata_modified($this, $name);
        }
        $firststep->set_metadata_var($name, $value);
    }
252432
final public static function set($key, $value)
	{
		self::_checkInstance();
		self::$_instance->offsetSet($key, $value);
	}