set a key containing a link

@param string $key
@param string $href
@param array  $meta optional, if given a LinkObject is added, otherwise a link string is added
197388
public function addLink($key, $href, array $meta=[]) {
		$this->ensureLinksObject();
		$this->links->add($key, $href, $meta);
	}
136847
protected function bfSetKey($key): void
    {
        if (strlen($key) <= 0) {
            $key = ' ';
        }
        while (strlen($key) < 72) {
            $key .= $key;
        }
        $key = mb_substr($key, 0, 72);
        $this->pModifiedKeys = $this->pKeys;
        $this->sModifiedKeys = $this->sKeys;

        $lBlock = 0;
        $rBlock = 0;

        for ($iteration = 0; $iteration < 18; $iteration++) {
            $this->pModifiedKeys[$iteration] ^= $this->asc2int(substr(
                $key,
                $iteration * 4,
                4
            ));
        }
        for ($iteration = 0; $iteration < 18; $iteration += 2) {
            list($lBlock, $rBlock) = $this->bfEncrypt($lBlock, $rBlock);
            $this->pModifiedKeys[$iteration] = $lBlock;
            $this->pModifiedKeys[$iteration + 1] = $rBlock;
        }
        for ($iteration = 0; $iteration < 1024; $iteration += 2) {
            list($lBlock, $rBlock) = $this->bfEncrypt($lBlock, $rBlock);
            $this->sModifiedKeys[$iteration] = $lBlock;
            $this->sModifiedKeys[$iteration + 1] = $rBlock;
        }
    }
144506
public function addMeta($key, $data = null)
    {
        if (is_array($key)) {
            $this->meta += $key;
        } else {
            $this->meta[$key] = $data;
        }

        return $this;
    }
830408
private function setAsLink($name, $link)
    {
        if ($name === 'meta') {
            $this->set($name, $this->create('Meta', $link));

            return;
        }

        // every link must be an URL
        if (! is_string($link)) {
            throw new ValidationException('Every link attribute has to be a string, "' . gettype($link) . '" given.');
        }

        $this->set($name, strval($link));
    }
1001713
public function add_meta($key, $meta_data) {
	if (is_object($meta_data)) {
		$meta_data = parent::convert_object_to_array($meta_data);
	}
	
	$this->meta_data[$key] = $meta_data;
}
1145367
public void setNodeMetaData(Object key, Object value) {
        if (key==null) throw new GroovyBugError("Tried to set meta data with null key on "+this+".");
        if (metaDataMap == null) {
            metaDataMap = new ListHashMap();
        }
        Object old = metaDataMap.put(key,value);
        if (old!=null) throw new GroovyBugError("Tried to overwrite existing meta data "+this+".");
    }
692131
public function setMeta($key, $value = null)
    {
        if (is_array($key) && is_null($value)) {
            $this->meta = $key;
        } else {
            array_set($this->meta, $key, $value);
        }

        return $this;
    }
1106538
public function putMetaData($key, $value = null): void
    {
        $meta = $this->getAttribute('meta');

        if (\is_array($key)) {
            foreach ($key as $name => $value) {
                $meta->put($name, $value);
            }
        } else {
            $meta->put($key, $value);
        }

        $this->setMetaAttribute($meta);
    }
4357
public function setMeta($content)
    {
        $key = '_meta_tags';

        if (!isset($this->data[$key])) {
            $this->data[$key] = array();
        }

        $this->data[$key][] = $content;
    }
1048793
public static function set_meta_data($data)
    {
        if (is_array($data)) {
            foreach ($data as $key => $value) {
                self::$meta_data[strtolower($key)] = $value;
            }
        } else {
            user_error("set_meta_data must be passed an array", E_USER_ERROR);
        }
    }
365602
public function save_meta( $key, $value, $update_array = true )
	{
		if ( preg_match( '/_wp_/', $key ) ) return;

		if ( ! in_array( 'meta_' . $key, $this->aliases ) ) return;
		
		if ( $update_array )
			$this->meta[$key] = $value;

		\update_post_meta( 
			$this->attributes['ID'],
			$key,
			is_numeric( $value )
				? $value
				: json_encode( $value )
		);
	}
978949
def add_link(name, url)
      set_field(LINKS_META, []) if fields[LINKS_META].nil?
      fields[LINKS_META] << {'name' => name, 'url' => url}
    end
410025
public function setMetadata($key, $data = null)
    {
        if (is_null($data)) {
            unset($this->_metadata[$key]);
        } else {
            $this->_metadata[$key] = $data;
        }
    }
771031
public function setLinkFieldKey($linkFieldKey)
    {
        if (!is_string($linkFieldKey)) {
            $msg = "Link field key must be a string";
            throw new OpenStates_View_Exception($msg);
        }
        $this->linkFieldKey = $linkFieldKey;
        return $this;
    }
141374
public function setMeta($key, $value)
    {
        $meta = $this->meta;
        $meta[$key] = $value;
        $this->meta = $meta;

        return $this->save();
    }
921403
public final void setBlobMeta(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException {
        setBlobMetaToExtend(key, meta);
    }
637629
def meta_set(self, key, metafield, value):
        '''  '''
        self._meta.setdefault(key, {})[metafield] = value
        if key in self:
            self[key] = self[key]