public function subfieldToArray($subfieldspec)
    {
        if (!$_sf = $this->parseSubfields($subfieldspec)) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::UNKNOWN,
                $subfieldspec
            );
        }

        if (1 < count($_sf)) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::MULTISF,
                $subfieldspec
            );
        }

        if ($_sf[0]['subfield'] !== $subfieldspec) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::USELESS,
                $subfieldspec
            );
        }

        return $_sf[0];
    }
public function subfieldToArray($subfieldspec)
    {
        if (!$_sf = $this->parseSubfields($subfieldspec)) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::UNKNOWN,
                $subfieldspec
            );
        }

        if (1 < count($_sf)) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::MULTISF,
                $subfieldspec
            );
        }

        if ($_sf[0]['subfield'] !== $subfieldspec) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::USELESS,
                $subfieldspec
            );
        }

        return $_sf[0];
    }
public function subfieldToArray ( $ subfieldspec ) { if ( ! $ _sf = $ this -> parseSubfields ( $ subfieldspec ) ) { throw new InvalidMARCspecException ( InvalidMARCspecException :: SF . InvalidMARCspecException :: UNKNOWN , $ subfieldspec ) ; } if ( 1 < count ( $ _sf ) ) { throw new InvalidMARCspecException ( InvalidMARCspecException :: SF . InvalidMARCspecException :: MULTISF , $ subfieldspec ) ; } if ( $ _sf [ 0 ] [ 'subfield' ] !== $ subfieldspec ) { throw new InvalidMARCspecException ( InvalidMARCspecException :: SF . InvalidMARCspecException :: USELESS , $ subfieldspec ) ; } return $ _sf [ 0 ] ; }
calls parseSubfields but makes sure only one subfield is present.

@param string $subfieldspec A subfieldspec

@return array An Array of subfieldspec
calls parseSubfields but makes sure only one subfield is present .