public static int scopeString2Int(boolean ignoreScope, String type) {
	type = StringUtil.toLowerCase(type);
	char c = type.charAt(0);

	// ignore scope only handles only reconize local,arguments as scope, the rest is ignored
	if (ignoreScope) {
	    if ('a' == c) {
		if ("arguments".equals(type)) return Scope.SCOPE_ARGUMENTS;
	    }
	    else if ('l' == c) {
		if ("local".equals(type)) return Scope.SCOPE_LOCAL;// LLL
	    }

	    else if ('r' == c) {
		if ("request".equals(type)) return Scope.SCOPE_REQUEST;
	    }
	    else if ('v' == c) {
		if ("variables".equals(type)) return Scope.SCOPE_VARIABLES;
	    }
	    else if ('s' == c) {
		if ("server".equals(type)) return Scope.SCOPE_SERVER;
	    }
	    return Scope.SCOPE_UNDEFINED;
	}

	if ('a' == c) {
	    if ("application".equals(type)) return Scope.SCOPE_APPLICATION;
	    else if ("arguments".equals(type)) return Scope.SCOPE_ARGUMENTS;
	}
	else if ('c' == c) {
	    if ("cgi".equals(type)) return Scope.SCOPE_CGI;
	    if ("cookie".equals(type)) return Scope.SCOPE_COOKIE;
	    if ("client".equals(type)) return Scope.SCOPE_CLIENT;
	    if ("cluster".equals(type)) return Scope.SCOPE_CLUSTER;
	}
	else if ('f' == c) {
	    if ("form".equals(type)) return Scope.SCOPE_FORM;
	}
	else if ('l' == c) {
	    if ("local".equals(type)) return Scope.SCOPE_LOCAL;// LLL
	}
	else if ('r' == c) {
	    if ("request".equals(type)) return Scope.SCOPE_REQUEST;
	}
	else if ('s' == c) {
	    if ("session".equals(type)) return Scope.SCOPE_SESSION;
	    if ("server".equals(type)) return Scope.SCOPE_SERVER;
	}
	else if ('u' == c) {
	    if ("url".equals(type)) return Scope.SCOPE_URL;
	}
	else if ('v' == c) {
	    if ("variables".equals(type)) return Scope.SCOPE_VARIABLES;
	}
	return Scope.SCOPE_UNDEFINED;
    }
public static int scopeString2Int ( boolean ignoreScope , String type ) { type = StringUtil . toLowerCase ( type ) ; char c = type . charAt ( 0 ) ; if ( ignoreScope ) { if ( 'a' == c ) { if ( "arguments" . equals ( type ) ) return Scope . SCOPE_ARGUMENTS ; } else if ( 'l' == c ) { if ( "local" . equals ( type ) ) return Scope . SCOPE_LOCAL ; } else if ( 'r' == c ) { if ( "request" . equals ( type ) ) return Scope . SCOPE_REQUEST ; } else if ( 'v' == c ) { if ( "variables" . equals ( type ) ) return Scope . SCOPE_VARIABLES ; } else if ( 's' == c ) { if ( "server" . equals ( type ) ) return Scope . SCOPE_SERVER ; } return Scope . SCOPE_UNDEFINED ; } if ( 'a' == c ) { if ( "application" . equals ( type ) ) return Scope . SCOPE_APPLICATION ; else if ( "arguments" . equals ( type ) ) return Scope . SCOPE_ARGUMENTS ; } else if ( 'c' == c ) { if ( "cgi" . equals ( type ) ) return Scope . SCOPE_CGI ; if ( "cookie" . equals ( type ) ) return Scope . SCOPE_COOKIE ; if ( "client" . equals ( type ) ) return Scope . SCOPE_CLIENT ; if ( "cluster" . equals ( type ) ) return Scope . SCOPE_CLUSTER ; } else if ( 'f' == c ) { if ( "form" . equals ( type ) ) return Scope . SCOPE_FORM ; } else if ( 'l' == c ) { if ( "local" . equals ( type ) ) return Scope . SCOPE_LOCAL ; } else if ( 'r' == c ) { if ( "request" . equals ( type ) ) return Scope . SCOPE_REQUEST ; } else if ( 's' == c ) { if ( "session" . equals ( type ) ) return Scope . SCOPE_SESSION ; if ( "server" . equals ( type ) ) return Scope . SCOPE_SERVER ; } else if ( 'u' == c ) { if ( "url" . equals ( type ) ) return Scope . SCOPE_URL ; } else if ( 'v' == c ) { if ( "variables" . equals ( type ) ) return Scope . SCOPE_VARIABLES ; } return Scope . SCOPE_UNDEFINED ; }
translate a string type definition to its int representation

@param type type to translate
@return int representation matching to given string