src/acdhOeaw/fedora/FedoraResource.php
public function getId(): string {
        $ids = $this->getIds();
        if (count($ids) === 0) {
            throw new NoAcdhId();
        }
        $acdhId = null;
        foreach ($ids as $id) {
            $inIdNmsp     = strpos($id, RC::idNmsp()) === 0;
            $inVocabsNmsp = strpos($id, RC::vocabsNmsp()) === 0;
            if ($inIdNmsp || $inVocabsNmsp) {
                if ($acdhId !== null) {
                    throw new ManyAcdhIds();
                }
                $acdhId = $id;
            }
        }
        if ($acdhId === null) {
            throw new NoAcdhId();
        }
        return $acdhId;
    }
public function getId(): string {
        $ids = $this->getIds();
        if (count($ids) === 0) {
            throw new NoAcdhId();
        }
        $acdhId = null;
        foreach ($ids as $id) {
            $inIdNmsp     = strpos($id, RC::idNmsp()) === 0;
            $inVocabsNmsp = strpos($id, RC::vocabsNmsp()) === 0;
            if ($inIdNmsp || $inVocabsNmsp) {
                if ($acdhId !== null) {
                    throw new ManyAcdhIds();
                }
                $acdhId = $id;
            }
        }
        if ($acdhId === null) {
            throw new NoAcdhId();
        }
        return $acdhId;
    }
public function getId ( ) : string { $ ids = $ this -> getIds ( ) ; if ( count ( $ ids ) === 0 ) { throw new NoAcdhId ( ) ; } $ acdhId = null ; foreach ( $ ids as $ id ) { $ inIdNmsp = strpos ( $ id , RC :: idNmsp ( ) ) === 0 ; $ inVocabsNmsp = strpos ( $ id , RC :: vocabsNmsp ( ) ) === 0 ; if ( $ inIdNmsp || $ inVocabsNmsp ) { if ( $ acdhId !== null ) { throw new ManyAcdhIds ( ) ; } $ acdhId = $ id ; } } if ( $ acdhId === null ) { throw new NoAcdhId ( ) ; } return $ acdhId ; }
Returns resource's ACDH UUID.

If there is no or are many ACDH UUIDs, an error is thrown.

@return string
@throws RuntimeException
@see getIds()
Returns resource s ACDH UUID .