Merges the given meta data

@param MetaData $data The meta data

@return void
162515
public function merge(MetaData $data): void
    {
        foreach ($data->toArray() as $key => $value) {
            $this->set($key, $value);
        }
    }
1331034
public function forgetMetaData($key): void
    {
        $meta = $this->getAttribute('meta');

        if (\is_array($key)) {
            foreach ($key as $name) {
                $meta->forget($name);
            }
        } else {
            $meta->forget($key);
        }

        $this->setMetaAttribute($meta);
    }
120957
public function mergedWith(Metadata $additionalMetadata): self
    {
        $values = array_merge($this->values, $additionalMetadata->values);

        if ($values === $this->values) {
            return $this;
        }

        return new static($values);
    }
938171
public function fill_meta($meta_data, $data_level=false) {
	foreach ($meta_data as $key => $single_meta_data) {
		$this->add_meta($key, $single_meta_data, $data_level);
	}
}
370745
function mergeMeta(ctx, newMeta) {
	if (newMeta)
		_.assign(ctx.meta, newMeta);
	return ctx.meta;
}
908351
@Override
    public void endMetaData(MetaData metadata)
    {
        this.builder.addBlock(new MetaDataBlock(this.builder.endBlockList(), metadata));
    }
257947
public function merge($data) : Collection
    {
        return static::create(array_merge($this->data, $this->convertToArray($data)));
    }
800377
public function addClass(DocumentMetadata $metadata): void
    {
        $this->graph->addNode($metadata->name);

        $assocNames = $metadata->getAssociationNames();
        foreach ($assocNames as $assocName) {
            $targetClass = $metadata->getAssociationTargetClass($assocName);
            $this->graph->addNode($targetClass);
            $this->graph->connect($metadata->name, $targetClass);
        }
    }
889499
public function addMeta(string $key, $value): void
	{
		Arr::set($this->meta, $key, $value);
	}
826780
public static void initializeMetadata()
    {
        // TODO: merge inside meta API.
        DbConn cnx = null;
        try
        {
            cnx = Helpers.getNewDbSession();
            Helpers.updateConfiguration(cnx);
            cnx.commit();
        }
        catch (Exception e)
        {
            throw new JqmRuntimeException("Could not set metadata", e);
        }
        finally
        {
            Helpers.closeQuietly(cnx);
        }
    }
501330
public function mergeHeadData($data)
	{
		if (empty($data) || !is_array($data))
		{
			return;
		}

		$this->title = (isset($data['title']) && !empty($data['title']) && !stristr($this->title, $data['title']))
			? $this->title . $data['title']
			: $this->title;
		$this->description = (isset($data['description']) && !empty($data['description']) && !stristr($this->description, $data['description']))
			? $this->description . $data['description']
			: $this->description;
		$this->link = (isset($data['link'])) ? $data['link'] : $this->link;

		if (isset($data['metaTags']))
		{
			foreach ($data['metaTags'] as $type1 => $data1)
			{
				$booldog = $type1 == 'http-equiv' ? true : false;
				foreach ($data1 as $name2 => $data2)
				{
					$this->setMetaData($name2, $data2, $booldog);
				}
			}
		}

		$this->_links = (isset($data['links']) && !empty($data['links']) && is_array($data['links']))
			? array_unique(array_merge($this->_links, $data['links']))
			: $this->_links;

		$this->_styleSheets = (isset($data['styleSheets']) && !empty($data['styleSheets']) && is_array($data['styleSheets']))
			? array_merge($this->_styleSheets, $data['styleSheets'])
			: $this->_styleSheets;

		if (isset($data['style']))
		{
			foreach ($data['style'] as $type => $stdata)
			{
				if (!isset($this->_style[strtolower($type)]) || !stristr($this->_style[strtolower($type)], $stdata))
				{
					$this->addStyleDeclaration($stdata, $type);
				}
			}
		}

		$this->_scripts = (isset($data['scripts']) && !empty($data['scripts']) && is_array($data['scripts']))
			? array_merge($this->_scripts, $data['scripts'])
			: $this->_scripts;

		if (isset($data['script']))
		{
			foreach ($data['script'] as $type => $sdata)
			{
				if (!isset($this->_script[strtolower($type)]) || !stristr($this->_script[strtolower($type)], $sdata))
				{
					$this->addScriptDeclaration($sdata, $type);
				}
			}
		}

		$this->_custom = (isset($data['custom']) && !empty($data['custom']) && is_array($data['custom']))
			? array_unique(array_merge($this->_custom, $data['custom']))
			: $this->_custom;

		return $this;
	}
822165
public function add($data) {
        if (!array_search($data, $this->_datas, true) && is_object($data)) {
            $data = clone $data;
        }

        if (is_array($data)) {
            $this->_datas = array_merge($this->_datas, $data);
        }
        else {
            if (get_class($data) != 'Gcs\Framework\Core\Collection\Collection') {
                array_push($this->_datas, $data);
            }
            else {
                array_merge($this->_datas, $data->data());
            }
        }
    }
754158
public function merge(array $attributes)
    {
        foreach ($attributes as $name => $value) {
            $this->add($name, $value);
        }
    }
439386
protected function sendMeta($metaData)
    {
        foreach ($this->destinations as $node) {
            $node->receiveMeta($metaData, $this);
        }
    }
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);
        }
    }
864099
public function mergeData()
    {
        if (isset($this->_data) && is_array($this->_data)) {
            // merge primitive types
            foreach ($this->_data as $member => $value) {
                if (!is_array($value)) {
                    if ($member == 'type') {
                        $this->set('type', new type($value, $this->_root));
                    } else {
                        $this->set($member, $value);
                    }
                }
            }
            // merge tags array
            if (isset($this->_data['tags']) && is_array($this->_data['tags'])) {
                $thisClass = strtolower(get_class($this));
                foreach ($this->_data['tags'] as $name => $tag) {
                    if (is_array($tag)) {
                        foreach ($this->_data['tags'][$name] as $key => $tag) {
                            if (
                                ($thisClass == 'rootdoc' && $this->_data['tags'][$name][$key]->inOverview()) ||
                                ($thisClass == 'packagedoc' && $this->_data['tags'][$name][$key]->inPackage()) ||
                                ($thisClass == 'classdoc' && $this->_data['tags'][$name][$key]->inType()) ||
                                ($thisClass == 'methoddoc' && $this->_data['tags'][$name][$key]->inMethod()) ||
                                ($thisClass == 'fielddoc' && $this->_data['tags'][$name][$key]->inField())
                            ) {
                                $this->_tags[$name][$key] =& $this->_data['tags'][$name][$key];
                                $this->_tags[$name][$key]->setParent($this);
                            }
                        }
                    } else {
                        if (
                            ($thisClass == 'rootdoc' && $this->_data['tags'][$name]->inOverview()) ||
                            ($thisClass == 'packagedoc' && $this->_data['tags'][$name]->inPackage()) ||
                            ($thisClass == 'classdoc' && $this->_data['tags'][$name]->inType()) ||
                            ($thisClass == 'methoddoc' && $this->_data['tags'][$name]->inMethod()) ||
                            ($thisClass == 'fielddoc' && $this->_data['tags'][$name]->inField())
                        ) {
                            $this->_tags[$name] =& $this->_data['tags'][$name];
                            $this->_tags[$name]->setParent($this);
                        }
                    }
                }
            }
            // merge parameter types
            if (isset($this->_parameters) && isset($this->_data['parameters'])) {
                foreach ($this->_data['parameters'] as $name => $param) {
                    if (substr($name, 0, 9) == '__unknown') {
                        $index = substr($name, 9);
                        $parameters = array_values($this->_parameters);
                        if (isset($parameters[$index])) {
                            $parameters[$index]->set('type', new type($param['type'], $this->_root));
                        }
                    } else {
                        if (!isset($this->_parameters[$name])) {
                            //phpdoctor::warning('Unknown parameter "'.$name.'" found for method "'.$this->_package.'.'.$this->_parent->name().'::'.$this->_name.'".');
                            $this->_parameters[$name] =& new fieldDoc($name, $this, $this->_root);
                            if (isset($this->_package)) $this->_parameters[$name]->set('package', $this->_package);
                        }
                        $this->_parameters[$name]->set('type', new type($param['type'], $this->_root));
                    }
                }
            }
            // merge return type
            if (isset($this->_returnType) && isset($this->_data['return'])) {
                $this->_returnType =& new type($this->_data['return'], $this->_root);
            }
            // merge exceptions
            if (isset($this->_throws) && isset($this->_data['throws'])) {
                foreach ($this->_data['throws'] as $name => $exception) {
                    $this->_throws[$name] =& $this->_data['throws'][$name];
                }
            }
        }
        // remove data array since we no longer need it
        #unset($this->_data);
    }
225343
protected static function mergeConfig($newData, &$baseConfig)
    {
        if (is_array($newData)) {
            foreach ($newData as $key => $value) {
                if (isset($baseConfig[$key])) {
                    self::mergeConfig($value, $baseConfig[$key]);
                } else {
                    $baseConfig[$key] = $value;
                }
            }
        } else {
            $baseConfig = $newData;
        }
    }