function guessResourceName(sURL, bLoadedResourcesOnly) {
		var sNamePrefix,
			sUrlPrefix,
			sResourceName;

		// Make sure to have an absolute URL without query parameters or hash
		// to check against absolute prefix URLs
		sURL = pathOnly(resolveURL(sURL));

		for (sNamePrefix in mUrlPrefixes) {

			// Note: configured URL prefixes are guaranteed to end with a '/'
			// But to support the legacy scenario promoted by the application tools ( "registerModulePath('Application','Application')" )
			// the prefix check here has to be done without the slash
			sUrlPrefix = mUrlPrefixes[sNamePrefix].absoluteUrl.slice(0, -1);

			if ( sURL.lastIndexOf(sUrlPrefix, 0) === 0 ) {

				// calc resource name
				sResourceName = sNamePrefix + sURL.slice(sUrlPrefix.length);
				// remove a leading '/' (occurs if name prefix is empty and if match was a full segment match
				if ( sResourceName.charAt(0) === '/' ) {
					sResourceName = sResourceName.slice(1);
				}

				if ( !bLoadedResourcesOnly || mModules[sResourceName] && mModules[sResourceName].data != undefined ) {
					return sResourceName;
				}
			}
		}
	}
/**
	 * Try to find a resource name that would be mapped to the given URL.
	 *
	 * If multiple path mappings would create a match, the returned name is not necessarily
	 * the best (longest) match. The first match which is found, will be returned.
	 *
	 * When <code>bLoadedResourcesOnly</code> is set, only those resources will be taken
	 * into account for which content has been loaded already.
	 *
	 * @param {string} sURL URL to guess the resource name for
	 * @param {boolean} [bLoadedResourcesOnly=false] Whether the guess should be limited to already loaded resources
	 * @returns {string} Resource name or undefined if no matching name could be found
	 * @private
	 */
Try to find a resource name that would be mapped to the given URL.
If multiple path mappings would create a match, the returned name is not necessarily
the best (longest) match. The first match which is found, will be returned.

When bLoadedResourcesOnly is set, only those resources will be taken
into account for which content has been loaded already.

@param {string} sURL URL to guess the resource name for
@param {boolean} [bLoadedResourcesOnly=false] Whether the guess should be limited to already loaded resources
@returns {string} Resource name or undefined if no matching name could be found
@private
Try to find a resource name that would be mapped to the given URL . If multiple path mappings would create a match the returned name is not necessarily the best ( longest ) match . The first match which is found will be returned . When bLoadedResourcesOnly is set only those resources will be taken into account for which content has been loaded already . @param { string } sURL URL to guess the resource name for @param { boolean } [ bLoadedResourcesOnly = false ] Whether the guess should be limited to already loaded resources @returns { string } Resource name or undefined if no matching name could be found @private
function guessResourceName(sURL, bLoadedResourcesOnly) {
		var sNamePrefix,
			sUrlPrefix,
			sResourceName;
		sURL = pathOnly(resolveURL(sURL));
		for (sNamePrefix in mUrlPrefixes) {
			sUrlPrefix = mUrlPrefixes[sNamePrefix].absoluteUrl.slice(0, -1);
			if ( sURL.lastIndexOf(sUrlPrefix, 0) === 0 ) {
				sResourceName = sNamePrefix + sURL.slice(sUrlPrefix.length);
				if ( sResourceName.charAt(0) === '/' ) {
					sResourceName = sResourceName.slice(1);
				}
				if ( !bLoadedResourcesOnly || mModules[sResourceName] && mModules[sResourceName].data != undefined ) {
					return sResourceName;
				}
			}
		}
	}
function guessResourceName ( sURL , bLoadedResourcesOnly ) { var sNamePrefix , sUrlPrefix , sResourceName ; sURL = pathOnly ( resolveURL ( sURL ) ) ; for ( sNamePrefix in mUrlPrefixes ) { sUrlPrefix = mUrlPrefixes [ sNamePrefix ] . absoluteUrl . slice ( 0 , - 1 ) ; if ( sURL . lastIndexOf ( sUrlPrefix , 0 ) === 0 ) { sResourceName = sNamePrefix + sURL . slice ( sUrlPrefix . length ) ; if ( sResourceName . charAt ( 0 ) === '/' ) { sResourceName = sResourceName . slice ( 1 ) ; } if ( ! bLoadedResourcesOnly || mModules [ sResourceName ] && mModules [ sResourceName ] . data != undefined ) { return sResourceName ; } } } }
Try to find a resource name that would be mapped to the given URL.
Try to find a resource name that would be mapped to the given URL .
// Make sure to have an absolute URL without query parameters or hash // to check against absolute prefix URLs // Note: configured URL prefixes are guaranteed to end with a '/' // But to support the legacy scenario promoted by the application tools ( "registerModulePath('Application','Application')" ) // the prefix check here has to be done without the slash // calc resource name // remove a leading '/' (occurs if name prefix is empty and if match was a full segment match