private function parseAttributeName(Input $definition): string
    {
        $maxLength = self::MAX_ATTRIBUTE_NAME_LENGTH;

        $name = $definition->takeAllAlphaNumUntil(":}");

        if (empty($name)) {
            throw InvalidRoute::emptyAttributeName($definition);
        }

        if (strlen($name) > $maxLength) {
            throw InvalidRoute::longAttributeName($definition, $maxLength);
        }

        return $name;
    }
private function parseAttributeName(Input $definition): string
    {
        $maxLength = self::MAX_ATTRIBUTE_NAME_LENGTH;

        $name = $definition->takeAllAlphaNumUntil(":}");

        if (empty($name)) {
            throw InvalidRoute::emptyAttributeName($definition);
        }

        if (strlen($name) > $maxLength) {
            throw InvalidRoute::longAttributeName($definition, $maxLength);
        }

        return $name;
    }
private function parseAttributeName ( Input $ definition ) : string { $ maxLength = self :: MAX_ATTRIBUTE_NAME_LENGTH ; $ name = $ definition -> takeAllAlphaNumUntil ( ":}" ) ; if ( empty ( $ name ) ) { throw InvalidRoute :: emptyAttributeName ( $ definition ) ; } if ( strlen ( $ name ) > $ maxLength ) { throw InvalidRoute :: longAttributeName ( $ definition , $ maxLength ) ; } return $ name ; }
Parse the attribute name.

@param Input $definition
@return string
@throws InvalidRoute
@throws UnexpectedChar
Parse the attribute name .