public function match()
	{
		$requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
		$method = $this->getRequestMethod();
		$uri = $this->getCurrentUri();

		// Loop all routes
		foreach ($this->routes[$method] as $route) {
			// we have a match!
			if (preg_match_all('#^' . $route['pattern'] . '$#', $uri, $matches, PREG_OFFSET_CAPTURE)) {
				die("route matched");
			}
		}
		die("no route matched");
	}
public function match()
	{
		$requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
		$method = $this->getRequestMethod();
		$uri = $this->getCurrentUri();

		// Loop all routes
		foreach ($this->routes[$method] as $route) {
			// we have a match!
			if (preg_match_all('#^' . $route['pattern'] . '$#', $uri, $matches, PREG_OFFSET_CAPTURE)) {
				die("route matched");
			}
		}
		die("no route matched");
	}
public function match ( ) { $ requestUrl = isset ( $ _SERVER [ 'REQUEST_URI' ] ) ? $ _SERVER [ 'REQUEST_URI' ] : '/' ; $ method = $ this -> getRequestMethod ( ) ; $ uri = $ this -> getCurrentUri ( ) ; // Loop all routes foreach ( $ this -> routes [ $ method ] as $ route ) { // we have a match! if ( preg_match_all ( '#^' . $ route [ 'pattern' ] . '$#' , $ uri , $ matches , PREG_OFFSET_CAPTURE ) ) { die ( "route matched" ) ; } } die ( "no route matched" ) ; }
match a current request
@return string The Request method to handle
match a current request