Sets the metadata array to be stored in adapters that can support it.

@param array $metadata

@return bool
777801
protected function setMetadata(array $metadata)
    {
        if ($metadata && $this->supportsMetadata()) {
            $this->filesystem->getAdapter()->setMetadata($this->key, $metadata);

            return true;
        }

        return false;
    }
384455
public function setMetaData(array $metaData, $merge = true)
    {
        $this->metaData = $merge ? array_merge_recursive($this->metaData, $metaData) : $metaData;

        return $this;
    }
457240
public function andMetadata(Metadata $metadata): self
    {
        $newMetadata = $this->metadata->merge($metadata);

        return new self($this->id, $this->playhead, $newMetadata, $this->payload, $this->recordedOn);
    }
983049
protected function metaobj2array($metadata) {
		$arr = array();
		
		if (is_array($metadata)) {
			foreach ($metadata as $meta) {
				$arr[$meta->Name] = $meta->Value;
			}
		} else {
			$arr[$metadata->Name] = $metadata->Value;
		}
		return $arr;
	}
410025
public function setMetadata($key, $data = null)
    {
        if (is_null($data)) {
            unset($this->_metadata[$key]);
        } else {
            $this->_metadata[$key] = $data;
        }
    }
151746
private function normalizeTreeMetadata($metadata)
    {
        $result = [];

        if (is_array(current($metadata)) === false) {
            $metadata = [$metadata];
        }

        foreach ($metadata as $entry) {
            $this->setEntryName($entry);
            $this->setEntryType($entry);
            $this->setEntryVisibility($entry);

            $this->setDefaultValue($entry, self::KEY_CONTENTS);
            $this->setDefaultValue($entry, self::KEY_STREAM);
            $this->setDefaultValue($entry, self::KEY_TIMESTAMP);


            $result[] = $entry;
        }

        return $result;
    }
573008
private function generateDocumentMethods(array $metadata)
    {
        $lines = [];

        foreach ($metadata['properties'] as $property) {
            if (isset($property['visibility']) && $property['visibility'] === 'public') {
                continue;
            }
            $lines[] = $this->generateDocumentMethod($property, $this->setMethodTemplate) . "\n";
            if (isset($property['property_type']) && $property['property_type'] === 'boolean') {
                $lines[] = $this->generateDocumentMethod($property, $this->isMethodTemplate) . "\n";
            }

            $lines[] = $this->generateDocumentMethod($property, $this->getMethodTemplate) . "\n";
        }

        return implode("\n", $lines);
    }
160620
public function setMeta(array $meta)
    {
        $this->took = isset($meta['took']) ? $meta['took'] : null;
        $this->timed_out = isset($meta['timed_out']) ? $meta['timed_out'] : null;
        $this->shards = isset($meta['_shards']) ? $meta['_shards'] : null;
        $this->hits = isset($meta['hits']) ? $meta['hits'] : null;
        $this->aggregations = isset($meta['aggregations']) ? $meta['aggregations'] : [];

        return $this;
    }
1119494
public function setContent($content, $metadata = array())
    {
        $this->content = $content;
        $this->setMetadata($metadata);

        return $this->size = $this->filesystem->write($this->key, $this->content, true);
    }
778223
public function setMetas(array $metas): MetaAwareInterface
    {
        $this->metas = $metas;

        //convert pluginAnnotation meta to correct key:value pair
        foreach ($this->metas as $index => $meta) {
            if ($meta instanceof PluginConfigAnnotation) {
                unset($this->metas[$index]);
                $this->setMeta($meta->getName(), $meta->getConfig());
            }
        }

        return $this;
    }
1330680
protected function onMetaReceived($metaData)
    {
        foreach ($this->params as $copy => $original) {
            $metaData["columns"][$copy] = $metaData["columns"][$original];
            $metaData["columns"][$copy]["type"] = "number";
        }
        return $metaData;
    }
724377
public function setMetaData($metaData) {
		if (is_array($metaData) && empty($metaData)) {
			$this->metaData = new \stdClass;
		} else {
			$this->metaData = $metaData;
		}

		return $this;
	}
270326
public function getContent($metadata = array())
    {
        if (isset($this->content)) {
            return $this->content;
        }
        $this->setMetadata($metadata);

        return $this->content = $this->filesystem->read($this->key);
    }
1337548
protected function setMetaEntity(array $data)
    {
        if (!empty($data['meta_title'])) {
            $this->setTitle($data['meta_title'], false);
        }

        if (!empty($data['meta_description'])) {
            $this->setMeta(array('name' => 'description', 'content' => $data['meta_description']));
        }

        $this->setMeta(array('rel' => 'canonical', 'href' => $this->path));
    }
24239
public function addMetadata(\TechPromux\DynamicQueryBundle\Entity\Metadata $metadata)
    {
        $this->metadatas[] = $metadata;

        return $this;
    }
690841
public function save(Metadata $metadata)
    {
        if (!$metadata->isValid($this->typeSchema)) {
            throw InvalidArgumentException::invalidMetadata($metadata, $this->typeSchema);
        }

        $this->saveTree($metadata, $this->schema, $this->typeSchema);
    }
927386
public function setMeta(array $meta)
    {
        foreach ($meta as $name => $value) {
            if (empty($value)) {
                unset($meta[$name]);
            }
        }

        $this->meta = $meta;

        return $this;
    }