src/acdhOeaw/fedora/Fedora.php
public function sanitizeUri(string $uri): string {
        if ($uri == '') {
            throw new BadMethodCallException('URI is empty');
        }
        $baseUrl = !$this->txUrl ? $this->apiUrl : $this->txUrl;
        $uri     = preg_replace('|^/|', '', $uri);
        $uri     = preg_replace('|^https?://[^/]+/rest/?(tx:[-0-9a-zA-Z]+/)?|', '', $uri);
        $uri     = $baseUrl . '/' . $uri;
        return $uri;
    }
public function sanitizeUri(string $uri): string {
        if ($uri == '') {
            throw new BadMethodCallException('URI is empty');
        }
        $baseUrl = !$this->txUrl ? $this->apiUrl : $this->txUrl;
        $uri     = preg_replace('|^/|', '', $uri);
        $uri     = preg_replace('|^https?://[^/]+/rest/?(tx:[-0-9a-zA-Z]+/)?|', '', $uri);
        $uri     = $baseUrl . '/' . $uri;
        return $uri;
    }
public function sanitizeUri ( string $ uri ) : string { if ( $ uri == '' ) { throw new BadMethodCallException ( 'URI is empty' ) ; } $ baseUrl = ! $ this -> txUrl ? $ this -> apiUrl : $ this -> txUrl ; $ uri = preg_replace ( '|^/|' , '' , $ uri ) ; $ uri = preg_replace ( '|^https?://[^/]+/rest/?(tx:[-0-9a-zA-Z]+/)?|' , '' , $ uri ) ; $ uri = $ baseUrl . '/' . $ uri ; return $ uri ; }
Adjusts URI to the current object state by setting up the proper base
URL and the transaction id.

@param string $uri resource URI
@return string
Adjusts URI to the current object state by setting up the proper base URL and the transaction id .