private function getCallable($method, $route)
	{
		if (!array_key_exists($method, $this->routes)) {
			throw new ServerResponseException(new ServerResponse(404));
		}

		foreach ($this->routes[$method] as $entry) {
			if (preg_match($entry->pattern, $route, $matches) > 0) {
				array_shift($matches);
				return [$entry->callable, $matches];
			}
		}

		throw new ServerResponseException(new ServerResponse(404));
	}
private function getCallable($method, $route)
	{
		if (!array_key_exists($method, $this->routes)) {
			throw new ServerResponseException(new ServerResponse(404));
		}

		foreach ($this->routes[$method] as $entry) {
			if (preg_match($entry->pattern, $route, $matches) > 0) {
				array_shift($matches);
				return [$entry->callable, $matches];
			}
		}

		throw new ServerResponseException(new ServerResponse(404));
	}
private function getCallable ( $ method , $ route ) { if ( ! array_key_exists ( $ method , $ this -> routes ) ) { throw new ServerResponseException ( new ServerResponse ( 404 ) ) ; } foreach ( $ this -> routes [ $ method ] as $ entry ) { if ( preg_match ( $ entry -> pattern , $ route , $ matches ) > 0 ) { array_shift ( $ matches ) ; return [ $ entry -> callable , $ matches ] ; } } throw new ServerResponseException ( new ServerResponse ( 404 ) ) ; }
Returns the callable to which the specied method and route are mapped.

@param string $method
@param string $route
@return array the callable to which the specied method and route are mapped and the route matches.
@throws ServerResponseException
Returns the callable to which the specied method and route are mapped .