src/Routing/Route.php
public function matches($url)
    {
        $pattern = $this->getRegexPattern();

        if (preg_match($pattern, $url, $matches)) {

            // Remove entries with int keys to filter out only named matches
            foreach ($matches as $key => $value) {
                if (is_int($key)) {
                    unset($matches[$key]);
                }
            }

            return $matches;
        }

        return false;
    }
public function matches($url)
    {
        $pattern = $this->getRegexPattern();

        if (preg_match($pattern, $url, $matches)) {

            // Remove entries with int keys to filter out only named matches
            foreach ($matches as $key => $value) {
                if (is_int($key)) {
                    unset($matches[$key]);
                }
            }

            return $matches;
        }

        return false;
    }
public function matches ( $ url ) { $ pattern = $ this -> getRegexPattern ( ) ; if ( preg_match ( $ pattern , $ url , $ matches ) ) { // Remove entries with int keys to filter out only named matches foreach ( $ matches as $ key => $ value ) { if ( is_int ( $ key ) ) { unset ( $ matches [ $ key ] ) ; } } return $ matches ; } return false ; }
Checks whether this route matches the given url.
Checks whether this route matches the given url .