src/Routing/RoutingResolver.php
private function matchRule($route, RoutingRuleAbstract &$rule) {
        list($regex, $inputs) = $this->getRegexProperties($rule);

        $matches = array();
        preg_match($regex, $route, $matches);
        if (count($matches) > 0) {
            //Substract the first element of the array, which is the complete URL
            array_splice($matches, 0, 1);
            for ($i = 0; $i < count($inputs); $i++) {
                $key = $inputs[$i];
                $value = $matches[$i];
                $rule->getInput()->setInput($key, $value);
            }
            return true;
        }
        return false;
    }
private function matchRule($route, RoutingRuleAbstract &$rule) {
        list($regex, $inputs) = $this->getRegexProperties($rule);

        $matches = array();
        preg_match($regex, $route, $matches);
        if (count($matches) > 0) {
            //Substract the first element of the array, which is the complete URL
            array_splice($matches, 0, 1);
            for ($i = 0; $i < count($inputs); $i++) {
                $key = $inputs[$i];
                $value = $matches[$i];
                $rule->getInput()->setInput($key, $value);
            }
            return true;
        }
        return false;
    }
Check if route matches with rule depending on regular expression which
defines them.
@param string $route
@param RoutingRuleAbstract $rule
@return bool true if rule matches with route or false if not