Private/Polyfony/Router.php
private static function routeMatch(string $request_url, string $request_method, Route $route) :bool {

		// if the method is set for that route, and it doesn't match
		if(!$route->hasMethod($request_method)) {
			return false;
		}
		// if the url doesn't begin with the static segment or that route
		if(!$route->hasStaticUrlSegment($request_url)) {
			return false;
		}
		// if we've got a redirect, let's go for it
		$route->redirectIfItIsOne();
		// get a list of current request parameters, with numerical indexes
		$indexed_request_parameters = Request::getUrlIndexedParameters($route->staticSegment);
		// if restricttion against url parameters don't match
		if(!$route->validatesTheseParameters($indexed_request_parameters)) {
			return false;
		}
		// send the named parameters to the request class
		$route->sendNamedParametersToRequest($indexed_request_parameters);
		// deduce the dynamic action from the url parameters if necessary
		$route->deduceAction();
		// check if they match defined constraints
		return true;

	}
private static function routeMatch(string $request_url, string $request_method, Route $route) :bool {

		// if the method is set for that route, and it doesn't match
		if(!$route->hasMethod($request_method)) {
			return false;
		}
		// if the url doesn't begin with the static segment or that route
		if(!$route->hasStaticUrlSegment($request_url)) {
			return false;
		}
		// if we've got a redirect, let's go for it
		$route->redirectIfItIsOne();
		// get a list of current request parameters, with numerical indexes
		$indexed_request_parameters = Request::getUrlIndexedParameters($route->staticSegment);
		// if restricttion against url parameters don't match
		if(!$route->validatesTheseParameters($indexed_request_parameters)) {
			return false;
		}
		// send the named parameters to the request class
		$route->sendNamedParametersToRequest($indexed_request_parameters);
		// deduce the dynamic action from the url parameters if necessary
		$route->deduceAction();
		// check if they match defined constraints
		return true;

	}
private static function routeMatch ( string $ request_url , string $ request_method , Route $ route ) : bool { // if the method is set for that route, and it doesn't match if ( ! $ route -> hasMethod ( $ request_method ) ) { return false ; } // if the url doesn't begin with the static segment or that route if ( ! $ route -> hasStaticUrlSegment ( $ request_url ) ) { return false ; } // if we've got a redirect, let's go for it $ route -> redirectIfItIsOne ( ) ; // get a list of current request parameters, with numerical indexes $ indexed_request_parameters = Request :: getUrlIndexedParameters ( $ route -> staticSegment ) ; // if restricttion against url parameters don't match if ( ! $ route -> validatesTheseParameters ( $ indexed_request_parameters ) ) { return false ; } // send the named parameters to the request class $ route -> sendNamedParametersToRequest ( $ indexed_request_parameters ) ; // deduce the dynamic action from the url parameters if necessary $ route -> deduceAction ( ) ; // check if they match defined constraints return true ; }
Test to see if this route is valid against the URL.

@access private
@param  array      $requestUrl The URL to test the route against.
@param  Core\Route $route      A Route declared by the application.
@return boolean
Test to see if this route is valid against the URL .