/*!
Returns the meta data used for storing search indeces.
611
function metaData( $contentObjectAttribute )
    {
        $matrix = $contentObjectAttribute->content();
        $columnsArray = $matrix->attribute( 'columns' );
        $columns = $columnsArray['sequential'];
        $metaDataArray = array();
        foreach ( $columns as $column )
        {
            $rows = $column['rows'];
            foreach ( $rows as $row )
            {
                $metaDataArray[] = array( 'id' => $column['identifier'],
                                          'text' => $row );
            }
        }
        return $metaDataArray;
    }
1115380
private function getMetadata()
    {
        $this->logger->debug('[Metadata] Retrieving metadata...');

        $values = [];
        // property is a space-separated list of values
        $propertyPattern = '/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|image)\s*/i';

        // name is a single value
        $namePattern = '/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|image)\s*$/i';

        // Find description tags.
        foreach ($this->dom->getElementsByTagName('meta') as $meta) {
            /* @var DOMNode $meta */
            $elementName = $meta->getAttribute('name');
            $elementProperty = $meta->getAttribute('property');
            $content = $meta->getAttribute('content');
            $matches = null;
            $name = null;

            if ($elementProperty) {
                if (preg_match($propertyPattern, $elementProperty, $matches)) {
                    for ($i = count($matches) - 1; $i >= 0; $i--) {
                        // Convert to lowercase, and remove any whitespace
                        // so we can match below.
                        $name = preg_replace('/\s/', '', mb_strtolower($matches[$i]));
                        // multiple authors
                        $values[$name] = trim($content);
                    }
                }
            }

            if (!$matches && $elementName && preg_match($namePattern, $elementName)) {
                $name = $elementName;
                if ($content) {
                    // Convert to lowercase, remove any whitespace, and convert dots
                    // to colons so we can match below.
                    $name = preg_replace(['/\s/', '/\./'], ['', ':'], mb_strtolower($name));
                    $values[$name] = trim($content);
                }
            }
        }

        // get title
        /*
         * This is a very convoluted way of extracting the first matching key of the $values array
         * against a set of options.
         *
         * This could be easily replaced with an ugly set of isset($values['key']) or a bunch of ??s.
         * Will probably replace it with ??s after dropping support of PHP5.6
         */

        $key = current(array_intersect([
            'dc:title',
            'dcterm:title',
            'og:title',
            'weibo:article:title',
            'weibo:webpage:title',
            'title',
            'twitter:title'
        ], array_keys($values)));

        $this->setTitle(isset($values[$key]) ? trim($values[$key]) : null);

        if (!$this->getTitle()) {
            $this->setTitle($this->getArticleTitle());
        }

        // get author
        $key = current(array_intersect([
            'dc:creator',
            'dcterm:creator',
            'author'
        ], array_keys($values)));

        $this->setAuthor(isset($values[$key]) ? $values[$key] : null);

        // get description
        $key = current(array_intersect([
            'dc:description',
            'dcterm:description',
            'og:description',
            'weibo:article:description',
            'weibo:webpage:description',
            'description',
            'twitter:description'
        ], array_keys($values)));

        $this->setExcerpt(isset($values[$key]) ? $values[$key] : null);

        // get main image
        $key = current(array_intersect([
            'og:image',
            'twitter:image'
        ], array_keys($values)));

        $this->setImage(isset($values[$key]) ? $values[$key] : null);
    }
548307
public function meta($fid) {
        $cacheKey = 'file_meta_' . $fid;

        if ($this->cache && $this->cache->has($cacheKey)) {
            $val = $this->cache->get($cacheKey);

            if (!$val instanceof FileMeta) {
                $val = new FileMeta($val);
            }

            return $val;
        }

        $volume = $this->lookup($fid);

        if (!$volume) {
            return null;
        }

        $res = $this->client->head($this->buildVolumeUrl($volume->getPublicUrl(), $fid));

        if ($res->getStatusCode() != 200) {
            return null;
        }

        $meta = new FileMeta(
            $res->getHeaderLine('Content-Type'),
            $res->getHeaderLine('Content-Length'),
            new \DateTime($res->getHeaderLine('Last-Modified'))
        );

        if ($this->cache) {
            $this->cache->put($cacheKey, $meta);
        }

        return $meta;
    }
106007
public function getPageMetas()
    {
        if (!$this->parser) {
            return;
        }

        $nodes = $this->parser->find('meta');

        $metas = array();

        foreach ($nodes as $node) {
            if ($node->hasAttribute('name')) {
                $metas[ $node->getAttribute('name') ] = $node->getAttribute('content');
            } elseif ($node->hasAttribute('property')) {
                $metas[ $node->getAttribute('property') ] = $node->getAttribute('content');
            }
        }

        return $metas;
    }
1147579
public function getMetaPost() {

		$args = [
			'post_type' => 'metadata',
			'posts_per_page' => 1,
			'post_status' => 'publish',
			'orderby' => 'modified',
			'no_found_rows' => true,
			'cache_results' => true,
		];

		$q = new \WP_Query();
		$results = $q->query( $args );

		if ( empty( $results ) ) {
			return false;
		}

		return $results[0];
	}
1146809
public function getSearchableFieldsMeta()
    {
        if (!empty($this->searchableFieldsMeta)) {
            return $this->searchableFieldsMeta;
        }

        if ($searchableFieldsMeta = $this->getPropertyContainer()->getFields('hasMany')) {

            $searchableFieldsMeta = array_filter($searchableFieldsMeta, function (PropertyContract $property) {
                return $property->getBehavior()->isPersistent();
            });
        }
        $this->searchableFieldsMeta = $searchableFieldsMeta;

        return $this->searchableFieldsMeta;
    }
316923
public static function getMeta() {
		$sReturn = '';

		// nofollow, noindex
		if (!self::$_bRobotsIndex || !self::$_bRobotsFollow) {
			$sReturn .= '<meta name="ROBOTS" content="'
				.(self::$_bRobotsIndex  ? 'INDEX'  : 'NOINDEX').', '
				.(self::$_bRobotsFollow ? 'FOLLOW' : 'NOFOLLOW').'">'."\n";
		}

		// css
		foreach (array_merge(self::getConfig()['css'], self::$_lCSS) as $sCSS) {
			$sRel = 'stylesheet';
			if (substr($sCSS, -5) === '.less') {
				$sRel .= '/less';
			}
			$sReturn .= '<link rel="' . $sRel . '" href="' . $sCSS . '" type="text/css" />'."\n";
		}

		// js
		foreach (array_merge(self::getConfig()['js'], self::$_lJS) as $sJS) {
			$sReturn .= '<script src="' . $sJS . '"></script>' . "\n";
		}

		if (self::$_sAddMeta) {
			$sReturn .= self::$_sAddMeta;
		}

		return $sReturn;
	}
692724
public function get_meta( $_null, $post_ID = null, $meta_key = null, $single = false ) {

		if ( 'code' === $meta_key ) {
			$post = get_post( $post_ID );

			if ( is_object( $post ) && $this->object_type == $post->post_type ) {
				return $post->post_content;
			}
		}

		return $_null;
	}
369741
function metaData( $contentObjectAttribute )
    {
        $metaString = "";
        $user = $contentObjectAttribute->content();

        if ( $user instanceof eZUser )
        {
            // create a default user account
            $metaString .= $user->attribute( 'login' ) . " ";
            $metaString .= $user->attribute( 'email' ) . " ";
        }
        return $metaString;
    }
1356755
public function meta($key = null)
    {
        if ($key !== null) {
            return array_get($this->meta, $key);
        }

        return $this->meta;
    }
1173473
private function getPoiFromMetadata() {
        if ($this->metadata === null) {
            $metadata = $this->event->getDatabase()->getMetadata(
                $this->image->getUser(),
                $this->image->getImageIdentifier()
            );

            $poi = isset($metadata['poi'][0]) ? $metadata['poi'][0] : false;

            // Fetch POI from metadata. Array used if we want to expand with multiple POIs in the future
            if ($poi && isset($poi['cx']) && isset($poi['cy'])) {
                $this->metadata = [
                    (int) $poi['cx'],
                    (int) $poi['cy']
                ];
            } else if (
                $poi &&
                isset($poi['x']) && isset($poi['y']) &&
                isset($poi['width']) && isset($poi['height'])
            ) {
                $this->metadata = [
                    (int) $poi['x'] + ($poi['width']  / 2),
                    (int) $poi['y'] + ($poi['height'] / 2)
                ];
            } else {
                $this->metadata = false;
            }
        }

        return $this->metadata;
    }
817820
function ssetMeta($name = '', $content = '', $type = 'name', $newline = "\n\t")
	{
		// Since we allow the data to be passes as a string, a simple array
		// or a multidimensional one, we need to do a little prepping.
		if ( ! is_array($name))
		{
			$name = array(array('name' => $name, 'content' => $content, 'type' => $type, 'newline' => $newline));
		}
		elseif (isset($name['name']))
		{
			// Turn single array into multidimensional
			$name = array($name);
		}

		$str = '';
		foreach ($name as $meta)
		{
			$type		= ( ! isset($meta['type']) OR $meta['type'] === 'name') ? 'name' : 'http-equiv';
			$name		= isset($meta['name'])					? $meta['name'] : '';
			$content	= isset($meta['content'])				? $meta['content'] : '';
			$newline	= isset($meta['newline'])				? $meta['newline'] : "\n";

			$str .= '<meta '.$type.'="'.$name.'" content="'.$content.'" />'.$newline;
		}

		$this->_metadata .= $str;
	}
636017
protected function _getMetaFromContent($metaIdent)
    {
        if ($metaIdent) {
            $content = oxNew(\OxidEsales\Eshop\Application\Model\Content::class);
            if ($content->loadByIdent($metaIdent) &&
                $content->oxcontents__oxactive->value
            ) {
                return getStr()->strip_tags($content->oxcontents__oxcontent->value);
            }
        }
    }
248298
public function get_meta( $key ) {
		$metadata = $this->get_metadata();

		if ( ! array_key_exists( $key, $metadata ) ) {
			return;
		}

		return $metadata[ $key ];
	}
593024
function findMeta(any, key) {
  key = key || 'cql';
  var meta = (any.describe().meta || []).filter(function (m) {
    return key in m;
  });
  return meta[meta.length - 1];
}
112702
private function getMetaData() {

        if ($this->metaData === null) {
            $this->metaData = $this->readMetaData($this->getUserUuid());
        }

        return $this->metaData;
    }
331090
function filtermeta(meta) {
  let d = [];
  return meta.filter( function(e) {
    if (d.indexOf(e.tx._hhash) === -1) {
      d.push(e.tx._hhash);
      return true;
    }
    return false;
  });
}