Milliner/src/Service/MillinerService.php
protected function processJsonld(array $jsonld, $drupal_url, $fedora_url)
    {
        // Strip out everything other than the resource in question.
        $resource = array_filter(
            $jsonld['@graph'],
            function (array $elem) use ($drupal_url) {
                return $elem['@id'] == $drupal_url;
            }
        );

        // Put in an fedora url for the resource.
        $resource[0]['@id'] = $fedora_url;

        return $resource;
    }
protected function processJsonld(array $jsonld, $drupal_url, $fedora_url)
    {
        // Strip out everything other than the resource in question.
        $resource = array_filter(
            $jsonld['@graph'],
            function (array $elem) use ($drupal_url) {
                return $elem['@id'] == $drupal_url;
            }
        );

        // Put in an fedora url for the resource.
        $resource[0]['@id'] = $fedora_url;

        return $resource;
    }
protected function processJsonld ( array $ jsonld , $ drupal_url , $ fedora_url ) { // Strip out everything other than the resource in question. $ resource = array_filter ( $ jsonld [ '@graph' ] , function ( array $ elem ) use ( $ drupal_url ) { return $ elem [ '@id' ] == $ drupal_url ; } ) ; // Put in an fedora url for the resource. $ resource [ 0 ] [ '@id' ] = $ fedora_url ; return $ resource ; }
Normalizes Drupal jsonld into a shape Fedora understands.

@param array $jsonld
@param string $drupal_url
@param string $fedora_url

@return array
Normalizes Drupal jsonld into a shape Fedora understands .