Get meta info

@return array
432246
public function getMetaInfo()
    {
        if ($this->getAuthenticationDetails() instanceof AuthenticationDetails) {
            $authId     = $this->getAuthenticationDetails()->getAuthId();
            $authMethod = $this->getAuthenticationDetails()->getAuthMethod();
            $authRole   = $this->getAuthenticationDetails()->getAuthRole();
            $authRoles  = $this->getAuthenticationDetails()->getAuthRoles();
        } else {
            $authId     = 'anonymous';
            $authMethod = 'anonymous';
            $authRole   = 'anonymous';
            $authRoles  = [];
        }

        return [
            'realm'         => $this->getRealm()->getRealmName(),
            'authprovider'  => null,
            'authid'        => $authId,
            'authrole'      => $authRole,
            'authroles'     => $authRoles,
            'authmethod'    => $authMethod,
            'session'       => $this->getSessionId(),
            'role_features' => $this->getRoleFeatures()
        ];
    }
693737
private function getLocalizedMeta()
    {
        if ($this->localizedMeta) {
            return $this->localizedMeta;
        }

        $metas = $this->getFileVersion()->getMeta();
        $this->localizedMeta = $metas[0];

        foreach ($metas as $key => $meta) {
            if ($meta->getLocale() == $this->locale) {
                $this->localizedMeta = $meta;
                break;
            }
        }

        return $this->localizedMeta;
    }
810723
private function getAllInfo()
    {
        $data = [];
        $recommendation_area = $this->_parser->find('div[class="spaceit borderClass"]');
        foreach ($recommendation_area as $each_recom) {
            $tmp = [];

            $tmp['username'] = $this->getUsername($each_recom);
            $tmp['date'] = $this->getDate($each_recom);
            $tmp['source'] = $this->getSource($each_recom);
            $tmp['recommendation'] = $this->getRecomText($each_recom);

            $data[] = $tmp;
        }

        return $data;
    }
647743
protected function parseMeta($meta)
    {
        $fields = [];
        
        foreach ($meta as $key => $value) {
            $fields[] = [
                'title' => $key,
                'value' => $value,
            ];
        }
        
        return $fields;
    }
1074605
public function getCustomerInfo(): array
    {
        return [
            'email' => (string) $this->xml->CustomerInformation->Email,
            'phoneNumber' => (string) $this->xml->CustomerInformation->PhoneNumber,
            'customerNumber' => (string) $this->xml->CustomerInformation->CustomerNumber,
            'firstName' => (string) $this->xml->CustomerInformation->FirstName,
            'lastName' => (string) $this->xml->CustomerInformation->LastName,
            'address1' => (string) $this->xml->CustomerInformation->Address1,
            'address2' => (string) $this->xml->CustomerInformation->Address2,
            'postcode' => (string) $this->xml->CustomerInformation->Postcode,
            'town' => (string) $this->xml->CustomerInformation->Town,
            'country' => (string) $this->xml->CustomerInformation->Country,
            'socialSecurityNumber' => (string) $this->xml->CustomerInformation->SocialSecurityNumber,
            'companyName' => (string) $this->xml->CustomerInformation->CompanyName,
            'companyRegistrationNumber' => (string) $this->xml->CustomerInformation->CompanyRegistrationNumber,
        ];
    }
292681
private function __metaToData()
    {
        $strReturn = "";

        if (isset($this->__meta["data"]) && is_array($this->__meta["data"])) {
            foreach ($this->__meta["data"] as $strKey => $strValue) {
                $strReturn .= "data-" . strtolower($strKey) . "=\"" . $strValue . "\" ";
            }
        }

        return $strReturn;
    }
345381
public function getDataForm(): array
    {
        $data = [];
        foreach ($this->dicionario as $meta) {
            if($meta->getFormat() === "password") {
                $data[$meta->getColumn()] = "";
            } else {
                $data[$meta->getColumn()] = $meta->getValue();
            }
        }

        return $data;
    }
1057069
private function getMetaAndAliases()
    {
        $arr = explode('.', $this->field);
        $meta = $this->getClassMetadata();
        $metaAnterior = [];
        $parent = '';
        $alias = '';

        for ($i = 0; $i <= $this->position; $i++) {
            $metaAnterior = $meta;

            if ($meta->hasAssociation($arr[$i])) {
                $class = $meta->getAssociationTargetClass($arr[$i]);
            } elseif (count($meta->subClasses) > 0) {
                $temp = $this->getSubClassFields($meta, $arr[$i]);
                if (!empty($temp['meta'])) {
                    $class = $temp['table'];
                }
            }

            $meta = $this->em->getClassMetadata($class);

            if ($i < $this->position) {
                $parent .= $parent != '' ? '_' : '';
                $parent .= $arr[$i];
            }
            if ($i == $this->position) {
                $alias .= $parent;
                $alias .= $parent != '' ? '_' : '';
                $alias .= $arr[$i];
            }
        }

        if ($parent == '' && $alias != '') {
            $parent = self::DEFAULT_TABLE_ALIAS;
        }
        if ($alias == '') {
            $alias = self::DEFAULT_TABLE_ALIAS;
        }

        return [
            'meta'        => $meta,
            'parentMeta'  => $metaAnterior,
            'alias'       => $alias,
            'parentAlias' => $parent,
        ];
    }
423414
private function get_mf2meta() {
		$meta = get_post_meta( $this->uid );
		if ( ! $meta ) {
			return array();
		}
		if ( isset( $meta['response'] ) ) {
			$response = maybe_unserialize( $meta['response'] );
			// Retrieve from the old response array and store in new location.
			if ( ! empty( $response ) ) {
				$new = array();
				// Convert to new format and update.
				if ( ! empty( $response['title'] ) ) {
					$new['name'] = $response['title'];
				}
				if ( ! empty( $response['url'] ) ) {
					$new['url'] = $response['url'];
				}
				if ( ! empty( $response['content'] ) ) {
					$new['content'] = $response['content'];
				}
				if ( ! empty( $response['published'] ) ) {
					$new['published'] = $response['published'];
				}
				if ( ! empty( $response['author'] ) ) {
					$new['card']         = array();
					$new['card']['name'] = $response['author'];
					if ( ! empty( $response['icon'] ) ) {
						$new['card']['photo'] = $response['icon'];
					}
				}
				$new         = array_unique( $new );
				$new['card'] = array_unique( $new['card'] );
				if ( isset( $new ) ) {
					update_post_meta( $this->uid, 'mf2_cite', $new );
					delete_post_meta( $this->uid, 'response' );
					$meta['cite'] = $new;
				}
			}
		}
		foreach ( $meta as $key => $value ) {
			if ( ! self::str_prefix( $key, 'mf2_' ) ) {
				unset( $meta[ $key ] );
			} else {
				unset( $meta[ $key ] );
				$key = str_replace( 'mf2_', '', $key );
				// Do not save microput prefixed instructions
				if ( self::str_prefix( $key, 'mp-' ) ) {
					continue;
				}
				$value = array_map( 'maybe_unserialize', $value );
				if ( 1 === count( $value ) ) {
					$value = array_shift( $value );
				}
				if ( is_string( $value ) ) {
					$meta[ $key ] = array( $value );
				} else {
					$meta[ $key ] = $value;
				}
			}
		}
		return array_filter( $meta );
	}
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);
    }
1044707
public function getIds(): array {
        $this->loadMetadata();
        $ids = array();
        foreach ($this->metadata->allResources(RC::idProp()) as $i) {
            $ids[] = $i->getUri();
        }
        return $ids;
    }
112702
private function getMetaData() {

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

        return $this->metaData;
    }
574408
public function getMeta()
    {
        $metas = '';
        foreach ($this->headmeta as $meta) {
            $metas .= $meta . "\n";
        }
        $metas = rtrim($metas, "\n");
        return $metas;
    }
248298
public function get_meta( $key ) {
		$metadata = $this->get_metadata();

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

		return $metadata[ $key ];
	}
1078030
public function meta()
    {
        return array_merge([
            'wrapperClasses' => $this->wrapperClasses,
            'indexClasses' => $this->indexClasses,
            'inputClasses' => $this->inputClasses,
            'fieldClasses' => $this->fieldClasses,
            'panelFieldClasses' => $this->panelFieldClasses,
            'labelClasses' => $this->labelClasses,
            'panelLabelClasses' => $this->panelLabelClasses,
            'indexLinkClasses' => $this->indexLinkClasses,
            'excerptClasses' => $this->excerptClasses,
        ], $this->meta);
    }
67819
public function getAllMetadata(): array
    {
        $metadatas = [];
        foreach ($this->loader->getAllClassNames() as $className) {
            $metadatas[] = $this->getMetadataFor($className);
        }

        return $metadatas;
    }
38070
protected function readMetadata(): array
    {
        try {
            $phpWord = IOFactory::load($this->file->getPathname());
            $docinfo = $phpWord->getDocInfo();

            $attrs = [
                'creator'        => $docinfo->getCreator(),
                'created'        => $docinfo->getCreated(),
                'lastModifiedBy' => $docinfo->getLastModifiedBy(),
                'modified'       => $docinfo->getModified(),
                'title'          => $docinfo->getTitle(),
                'description'    => $docinfo->getDescription(),
                'subject'        => $docinfo->getSubject(),
                'keywords'       => $docinfo->getKeywords(),
                'category'       => $docinfo->getCategory(),
                'company'        => $docinfo->getCompany(),
                'manager'        => $docinfo->getManager(),
            ];

            foreach ($attrs as $key => $value) {
                if (empty($value)) {
                    unset($attrs[$key]);
                }
            }

            return $attrs;
        } catch (Exception $e) {
            return [];
        }
    }