src/acdhOeaw/fedora/Fedora.php
public function sendRequest(Request $request): Response {
        if ($this->txUrl && time() - $this->txTimestamp > $this->txKeepAlive) {
            $this->prolong();
        }
        try {
            $response = $this->client->send($request);

            // Fedora triplestore plugin doesn't index resources which were
            // deleted and recreated within the same transaction so we need
            // to remember deleted resources and try to reindex them at the end
            // of a transaction.
            if ($request->getMethod() === 'DELETE') {
                $this->resToReindex[] = preg_replace('|/fcr:[-a-zA-Z0-9]+$|', '', $request->getUri());
            }
        } catch (RequestException $e) {
            switch ($e->getCode()) {
                case 410:
                    throw new Deleted();
                case 404:
                    throw new NotFound();
                default:
                    throw $e;
            }
        }
        return $response;
    }
public function sendRequest(Request $request): Response {
        if ($this->txUrl && time() - $this->txTimestamp > $this->txKeepAlive) {
            $this->prolong();
        }
        try {
            $response = $this->client->send($request);

            // Fedora triplestore plugin doesn't index resources which were
            // deleted and recreated within the same transaction so we need
            // to remember deleted resources and try to reindex them at the end
            // of a transaction.
            if ($request->getMethod() === 'DELETE') {
                $this->resToReindex[] = preg_replace('|/fcr:[-a-zA-Z0-9]+$|', '', $request->getUri());
            }
        } catch (RequestException $e) {
            switch ($e->getCode()) {
                case 410:
                    throw new Deleted();
                case 404:
                    throw new NotFound();
                default:
                    throw $e;
            }
        }
        return $response;
    }
public function sendRequest ( Request $ request ) : Response { if ( $ this -> txUrl && time ( ) - $ this -> txTimestamp > $ this -> txKeepAlive ) { $ this -> prolong ( ) ; } try { $ response = $ this -> client -> send ( $ request ) ; // Fedora triplestore plugin doesn't index resources which were // deleted and recreated within the same transaction so we need // to remember deleted resources and try to reindex them at the end // of a transaction. if ( $ request -> getMethod ( ) === 'DELETE' ) { $ this -> resToReindex [ ] = preg_replace ( '|/fcr:[-a-zA-Z0-9]+$|' , '' , $ request -> getUri ( ) ) ; } } catch ( RequestException $ e ) { switch ( $ e -> getCode ( ) ) { case 410 : throw new Deleted ( ) ; case 404 : throw new NotFound ( ) ; default : throw $ e ; } } return $ response ; }
Sends a given HTTP request to the Fedora.

Switches most important errors into specific error classes.
@param Request $request request to be send
@return Response
@throws Deleted
@throws NotFound
@throws RequestException
Sends a given HTTP request to the Fedora .