src/Routing/Route.php
public function matches($requestUri)
    {
        $requestUri = $this->normalizeUri($requestUri);
        $regex = $this->compile();

        if (preg_match('#^'.$regex.'$#i', $requestUri, $out)) {
            $this->data = $this->getOnlyStringKeys($out);
            return true;
        }

        return false;
    }
public function matches($requestUri)
    {
        $requestUri = $this->normalizeUri($requestUri);
        $regex = $this->compile();

        if (preg_match('#^'.$regex.'$#i', $requestUri, $out)) {
            $this->data = $this->getOnlyStringKeys($out);
            return true;
        }

        return false;
    }
public function matches ( $ requestUri ) { $ requestUri = $ this -> normalizeUri ( $ requestUri ) ; $ regex = $ this -> compile ( ) ; if ( preg_match ( '#^' . $ regex . '$#i' , $ requestUri , $ out ) ) { $ this -> data = $ this -> getOnlyStringKeys ( $ out ) ; return true ; } return false ; }
Check if a route matches a given url

@param $requestUri
@return bool
Check if a route matches a given url