private function handleSubfieldRanges($arg)
    {
        if (strlen($arg) < 3) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::LENGTH3,
                $arg
            );
        }

        if (preg_match('/[a-z]/', $arg[0]) && !preg_match('/[a-z]/', $arg[2])) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::RANGE,
                $arg
            );
        }
        if (preg_match('/[A-Z]/', $arg[0]) && !preg_match('/[A-Z]/', $arg[2])) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::RANGE,
                $arg
            );
        }
        if (preg_match('/[0-9]/', $arg[0]) && !preg_match('/[0-9]/', $arg[2])) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::RANGE,
                $arg
            );
        }
        if ($arg[0] > $arg[2]) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::RANGE,
                $arg
            );
        }

        return range((string) $arg[0], (string) $arg[2]);
    }
private function handleSubfieldRanges($arg)
    {
        if (strlen($arg) < 3) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::LENGTH3,
                $arg
            );
        }

        if (preg_match('/[a-z]/', $arg[0]) && !preg_match('/[a-z]/', $arg[2])) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::RANGE,
                $arg
            );
        }
        if (preg_match('/[A-Z]/', $arg[0]) && !preg_match('/[A-Z]/', $arg[2])) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::RANGE,
                $arg
            );
        }
        if (preg_match('/[0-9]/', $arg[0]) && !preg_match('/[0-9]/', $arg[2])) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::RANGE,
                $arg
            );
        }
        if ($arg[0] > $arg[2]) {
            throw new InvalidMARCspecException(
                InvalidMARCspecException::SF.
                InvalidMARCspecException::RANGE,
                $arg
            );
        }

        return range((string) $arg[0], (string) $arg[2]);
    }
private function handleSubfieldRanges ( $ arg ) { if ( strlen ( $ arg ) < 3 ) { throw new InvalidMARCspecException ( InvalidMARCspecException :: SF . InvalidMARCspecException :: LENGTH3 , $ arg ) ; } if ( preg_match ( '/[a-z]/' , $ arg [ 0 ] ) && ! preg_match ( '/[a-z]/' , $ arg [ 2 ] ) ) { throw new InvalidMARCspecException ( InvalidMARCspecException :: SF . InvalidMARCspecException :: RANGE , $ arg ) ; } if ( preg_match ( '/[A-Z]/' , $ arg [ 0 ] ) && ! preg_match ( '/[A-Z]/' , $ arg [ 2 ] ) ) { throw new InvalidMARCspecException ( InvalidMARCspecException :: SF . InvalidMARCspecException :: RANGE , $ arg ) ; } if ( preg_match ( '/[0-9]/' , $ arg [ 0 ] ) && ! preg_match ( '/[0-9]/' , $ arg [ 2 ] ) ) { throw new InvalidMARCspecException ( InvalidMARCspecException :: SF . InvalidMARCspecException :: RANGE , $ arg ) ; } if ( $ arg [ 0 ] > $ arg [ 2 ] ) { throw new InvalidMARCspecException ( InvalidMARCspecException :: SF . InvalidMARCspecException :: RANGE , $ arg ) ; } return range ( ( string ) $ arg [ 0 ] , ( string ) $ arg [ 2 ] ) ; }
Parses subfield ranges into single subfields.

@internal

@param string $arg The assumed subfield range

@throws CK\MARCspec\Exception\InvalidMARCspecException

@return array $_range[string] An array of subfield tags
Parses subfield ranges into single subfields .