Add metadata.

@param string $meta_key   Metadata key.
@param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
162781
public function add_meta( $meta_key, $meta_value ) {
		return add_metadata( $this->meta_type, $this->get_id(), $meta_key, $meta_value, true );
	}
298104
public function setMeta($key, $value = null)
	{
		Arr::set($this->metaContainer, $key, $value);
		return $this;
	}
779642
public void addMetadata(Metadata meta) {
    for (String k : meta.keySet()) {
      for (TiffObject to : meta.getList(k)) {
        add(k, to, meta.getMetadataObject(k).isDublinCore(), meta.getMetadataObject(k).getPath());
      }
    }
  }
992965
protected function initMeta(): void
    {
        // cache for reflection data
        $cacheKey = "meta.{$this->module}.{$this->controller}";

        if (!$meta = Cache::get($cacheKey)) {
            $meta = new Meta($this->getFile());
            $meta->process();

            Cache::set(
                $cacheKey,
                $meta,
                Cache::TTL_NO_EXPIRY,
                ['system', 'meta']
            );
        }
        $this->meta = $meta;
    }
872193
public static function getColumnModelFromMetadata(ColumnsMetadata $metadata_columns)
    {
        $cm = new ColumnModel();
        $cm->setMetatadata($metadata_columns);
        foreach ($metadata_columns as $name => $meta) {
            $column = new Column($name);
            $column->setType(self::getColumnTypeByMetadataType($meta->getDataType()));
            $column->setVirtual(false);
            $cm->add($column);
        }

        return $cm;
    }
47713
def add(self, term, field, metadata):
        """"""
        if term not in self.metadata:
            self.metadata[term] = {field: metadata}
            return

        if field not in self.metadata[term]:
            self.metadata[term][field] = metadata
            return

        for key in metadata.keys():
            if key in self.metadata[term][field]:
                self.metadata[term][field][key].extend(metadata[key])
            else:
                self.metadata[term][field][key] = metadata[key]
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;
}
1019955
public static function setVal($metaKey, $elementKey, $elementId, $value)
    {
        $data = self::create()
            ->filterByMetaKey($metaKey)
            ->filterByElementKey($elementKey)
            ->filterByElementId($elementId)
            ->findOne()
        ;

        if (null === $data) {
            $data = new MetaData();
            $data->setMetaKey($metaKey);
            $data->setElementKey($elementKey);
            $data->setElementId($elementId);
        }

        $data->setValue($value);

        $data->save();
    }
410025
public function setMetadata($key, $data = null)
    {
        if (is_null($data)) {
            unset($this->_metadata[$key]);
        } else {
            $this->_metadata[$key] = $data;
        }
    }
348889
function putMeta(key, value) {
  const { schema, table } = findSchemaAndTable(key),
    map = columnToValueMap('id', key);

  // add meta column to map
  columnToValueMap('meta', parseOrNot(value), map);

  return onConflictPut(map, schema, table).then(() => map.meta);
}
476590
public function metaCustomColumn($column_name, $meta_field, $id)
    {
        if ($column_name === $column_name) {
            $column_name = get_post_meta($id, $meta_field, true);
            echo $column_name;
        }
    }
978365
public function setMetadata($key, $value)
    {
        if (is_null($this->metadataCache))
        {
            $this->metadataCache = [];
        }

        $this->metadataCache[$key] = $value;
    }
745455
def set_meta(self, meta=None, **kwargs):
        '''
        
        '''
        if meta is None:
            meta = self.get_meta(**kwargs)
        setattr(self, '_meta', meta)
1287379
public function setMetadata($key, $value)
	{
		// The key and value should be encoded.
		$key = urlencode($key);
		$value = urlencode($value);

		if (count($this->metadataHeaders) < self::MAX_METADATA_HEADERS) {
			if (strlen($key) <= self::MAX_METADATA_KEY) {
				if (strlen($value) <= self::MAX_METADATA_VALUE) {
					$this->metadataHeaders['X-Container-Meta-' . $key] = $value;
				} else {
					throw new BadMetadataException(
						"Only " . self::MAX_METADATA_VALUE
						. " characters allowed for the metadata header value!");
				}
			} else {
				throw new BadMetadataException(
					"Only " . self::MAX_METADATA_KEY
					. " characters allowed for the metadata header key!");
			}
		} else {
			throw new BadMetadataException(
				"Only " . self::MAX_METADATA_HEADERS . " metadata headers allowed!");
		}
	}
856123
public function update_metadata($meta_key, $meta_value)
    {
        $this->meta[$meta_key] = $meta_value;

        update_comment_meta($this->comment_ID, $meta_key, $meta_value);
    }
860115
public function addMetadata(Metadata $metadata)
    {
        if (isset($this->metadata[$metadata->getEntityClass()])) {
            throw new MetadataException(sprintf('Metadata for entity "%s" is already added.', $metadata->getEntityClass()));
        }

        $this->metadata[$metadata->getEntityClass()] = $metadata;
    }
1034413
public function add_meta( $object_type, $_null = null, $object_id = 0, $meta_key = '', $meta_value = '', $unique = false ) {

		if ( pods_tableless() ) {
			return $_null;
		}

		$object = $this->get_object( $object_type, $object_id );

		if ( empty( $object_id ) || empty( $object ) || ! isset( $object['fields'][ $meta_key ] ) ) {
			return $_null;
		}

		if ( in_array( $object['fields'][ $meta_key ]['type'], PodsForm::tableless_field_types() ) ) {
			if ( ! is_object( self::$current_field_pod ) || self::$current_field_pod->pod != $object['name'] ) {
				self::$current_field_pod = pods( $object['name'], $object_id );
			} elseif ( self::$current_field_pod->id() != $object_id ) {
				self::$current_field_pod->fetch( $object_id );
			}

			$pod = self::$current_field_pod;

			$pod->add_to( $meta_key, $meta_value );
		} else {
			if ( ! is_object( self::$current_field_pod ) || self::$current_field_pod->pod != $object['name'] ) {
				self::$current_field_pod = pods( $object['name'] );
			}

			$pod = self::$current_field_pod;

			$pod->save( $meta_key, $meta_value, $object_id, array(
				'podsmeta_direct' => true,
				'error_mode'      => 'false'
			) );
		}

		return $object_id;
	}