public static function process(\Request $request, $route = true)
	{
		$match = false;

		if ($route)
		{
			foreach (static::$routes as $route)
			{
				if ($match = $route->parse($request))
				{
					break;
				}
			}
		}

		if ( ! $match)
		{
			// Since we didn't find a match, we will create a new route.
			$match = new Route(preg_quote($request->uri->get(), '#'), $request->uri->get());
			$match->parse($request);
		}

		if ($match->callable !== null)
		{
			return $match;
		}

		return static::parse_match($match);
	}
public static function process(\Request $request, $route = true)
	{
		$match = false;

		if ($route)
		{
			foreach (static::$routes as $route)
			{
				if ($match = $route->parse($request))
				{
					break;
				}
			}
		}

		if ( ! $match)
		{
			// Since we didn't find a match, we will create a new route.
			$match = new Route(preg_quote($request->uri->get(), '#'), $request->uri->get());
			$match->parse($request);
		}

		if ($match->callable !== null)
		{
			return $match;
		}

		return static::parse_match($match);
	}
public static function process ( \ Request $ request , $ route = true ) { $ match = false ; if ( $ route ) { foreach ( static :: $ routes as $ route ) { if ( $ match = $ route -> parse ( $ request ) ) { break ; } } } if ( ! $ match ) { // Since we didn't find a match, we will create a new route. $ match = new Route ( preg_quote ( $ request -> uri -> get ( ) , '#' ) , $ request -> uri -> get ( ) ) ; $ match -> parse ( $ request ) ; } if ( $ match -> callable !== null ) { return $ match ; } return static :: parse_match ( $ match ) ; }
Processes the given request using the defined routes

@param	Request		the given Request object
@param	bool		whether to use the defined routes or not
@return	mixed		the match array or false
Processes the given request using the defined routes