protected function matched($patt, $call = true)
    {
        if (preg_match($patt, $this->req->path, $m)) {
            if ($call) {
                $this->matched = true;
            }
            array_shift($m);
            $this->matchedArgs = array_map([$this, 'trimSlash'], $m);
            return true;
        }
        return false;
    }
protected function matched($patt, $call = true)
    {
        if (preg_match($patt, $this->req->path, $m)) {
            if ($call) {
                $this->matched = true;
            }
            array_shift($m);
            $this->matchedArgs = array_map([$this, 'trimSlash'], $m);
            return true;
        }
        return false;
    }
protected function matched ( $ patt , $ call = true ) { if ( preg_match ( $ patt , $ this -> req -> path , $ m ) ) { if ( $ call ) { $ this -> matched = true ; } array_shift ( $ m ) ; $ this -> matchedArgs = array_map ( [ $ this , 'trimSlash' ] , $ m ) ; return true ; } return false ; }
Checks whether the current route matches the specified pattern.

@param string $patt
@param bool $call

@return bool
Checks whether the current route matches the specified pattern .