src/acdhOeaw/fedora/FedoraResource.php
private function getMetadataFromFedora(): Resource {
        $uri     = $this->fedora->sanitizeUri($this->uri);
        $request = new Request('GET', $uri . '/fcr:metadata', ['Accept' => 'application/n-triples']);
        $resp    = $this->fedora->sendRequest($request);

        $format  = '';
        $headers = $resp->getHeaders();
        if (isset($headers['Content-Type'])) {
            $format = explode(';', $headers['Content-Type'][0])[0];
        }
        $this->extractAcl($resp);

        $graph = new Graph();
        $graph->parse($resp->getBody(), $format);
        $meta  = $graph->resource($uri);

        return $meta;
    }
private function getMetadataFromFedora(): Resource {
        $uri     = $this->fedora->sanitizeUri($this->uri);
        $request = new Request('GET', $uri . '/fcr:metadata', ['Accept' => 'application/n-triples']);
        $resp    = $this->fedora->sendRequest($request);

        $format  = '';
        $headers = $resp->getHeaders();
        if (isset($headers['Content-Type'])) {
            $format = explode(';', $headers['Content-Type'][0])[0];
        }
        $this->extractAcl($resp);

        $graph = new Graph();
        $graph->parse($resp->getBody(), $format);
        $meta  = $graph->resource($uri);

        return $meta;
    }
private function getMetadataFromFedora ( ) : Resource { $ uri = $ this -> fedora -> sanitizeUri ( $ this -> uri ) ; $ request = new Request ( 'GET' , $ uri . '/fcr:metadata' , [ 'Accept' => 'application/n-triples' ] ) ; $ resp = $ this -> fedora -> sendRequest ( $ request ) ; $ format = '' ; $ headers = $ resp -> getHeaders ( ) ; if ( isset ( $ headers [ 'Content-Type' ] ) ) { $ format = explode ( ';' , $ headers [ 'Content-Type' ] [ 0 ] ) [ 0 ] ; } $ this -> extractAcl ( $ resp ) ; $ graph = new Graph ( ) ; $ graph -> parse ( $ resp -> getBody ( ) , $ format ) ; $ meta = $ graph -> resource ( $ uri ) ; return $ meta ; }
Fetches metadata from Fedora.
@return Resource
@throws RequestException
@throws Deleted
Fetches metadata from Fedora .