src/Charcoal/Model/Service/MetadataLoader.php
public function loadMetadataByKey($ident)
    {
        if (!is_string($ident)) {
            throw new InvalidArgumentException(
                'Metadata identifier must be a string'
            );
        }

        $lineage  = $this->hierarchy($ident);
        $metadata = [];
        foreach ($lineage as $metaKey) {
            $data = $this->loadMetadataFromSource($metaKey);
            if (is_array($data)) {
                $metadata = array_replace_recursive($metadata, $data);
            }
        }

        return $metadata;
    }
public function loadMetadataByKey($ident)
    {
        if (!is_string($ident)) {
            throw new InvalidArgumentException(
                'Metadata identifier must be a string'
            );
        }

        $lineage  = $this->hierarchy($ident);
        $metadata = [];
        foreach ($lineage as $metaKey) {
            $data = $this->loadMetadataFromSource($metaKey);
            if (is_array($data)) {
                $metadata = array_replace_recursive($metadata, $data);
            }
        }

        return $metadata;
    }
public function loadMetadataByKey ( $ ident ) { if ( ! is_string ( $ ident ) ) { throw new InvalidArgumentException ( 'Metadata identifier must be a string' ) ; } $ lineage = $ this -> hierarchy ( $ ident ) ; $ metadata = [ ] ; foreach ( $ lineage as $ metaKey ) { $ data = $ this -> loadMetadataFromSource ( $ metaKey ) ; if ( is_array ( $ data ) ) { $ metadata = array_replace_recursive ( $ metadata , $ data ) ; } } return $ metadata ; }
Fetch the metadata for the given identifier.

@param  string $ident The metadata identifier to load.
@throws InvalidArgumentException If the identifier is not a string.
@return array
Fetch the metadata for the given identifier .