protected static function _parseScope($name, $request) {
		$url = trim($request->url, '/');
		$url = $url ? '/' . $url . '/' : '/';

		if (!$config = static::attached($name)) {
			return $url;
		}

		$scheme = $request->scheme . ($request->scheme ? '://' : '//');
		$host = $request->host;

		if ($config['absolute']) {
			preg_match($config['pattern'], $scheme . $host . $url, $match);
		} else {
			preg_match($config['pattern'], $url, $match);
		}

		if ($match) {
			$result = array_intersect_key($match, array_flip($config['params']));
			$request->params = [];
			if (isset($config['library'])) {
				$request->params['library'] = $config['library'];
			}
			$request->params += $result;
			if ($config['prefix']) {
				$url = preg_replace('@^/' . trim($config['prefix'], '/') . '@', '', $url);
			}
			return $url;
		}
		return false;
	}
protected static function _parseScope($name, $request) {
		$url = trim($request->url, '/');
		$url = $url ? '/' . $url . '/' : '/';

		if (!$config = static::attached($name)) {
			return $url;
		}

		$scheme = $request->scheme . ($request->scheme ? '://' : '//');
		$host = $request->host;

		if ($config['absolute']) {
			preg_match($config['pattern'], $scheme . $host . $url, $match);
		} else {
			preg_match($config['pattern'], $url, $match);
		}

		if ($match) {
			$result = array_intersect_key($match, array_flip($config['params']));
			$request->params = [];
			if (isset($config['library'])) {
				$request->params['library'] = $config['library'];
			}
			$request->params += $result;
			if ($config['prefix']) {
				$url = preg_replace('@^/' . trim($config['prefix'], '/') . '@', '', $url);
			}
			return $url;
		}
		return false;
	}
protected static function _parseScope ( $ name , $ request ) { $ url = trim ( $ request -> url , '/' ) ; $ url = $ url ? '/' . $ url . '/' : '/' ; if ( ! $ config = static :: attached ( $ name ) ) { return $ url ; } $ scheme = $ request -> scheme . ( $ request -> scheme ? '://' : '//' ) ; $ host = $ request -> host ; if ( $ config [ 'absolute' ] ) { preg_match ( $ config [ 'pattern' ] , $ scheme . $ host . $ url , $ match ) ; } else { preg_match ( $ config [ 'pattern' ] , $ url , $ match ) ; } if ( $ match ) { $ result = array_intersect_key ( $ match , array_flip ( $ config [ 'params' ] ) ) ; $ request -> params = [ ] ; if ( isset ( $ config [ 'library' ] ) ) { $ request -> params [ 'library' ] = $ config [ 'library' ] ; } $ request -> params += $ result ; if ( $ config [ 'prefix' ] ) { $ url = preg_replace ( '@^/' . trim ( $ config [ 'prefix' ] , '/' ) . '@' , '' , $ url ) ; } return $ url ; } return false ; }
Return the unscoped url to route.

@param string $name Scope name.
@param string $request A `lithium\action\Request` instance .
@return mixed The url to route, or `false` if the request doesn't match the scope.
Return the unscoped url to route .