public function isPatternMatches($pattern, $routePattern = false)
    {
        $uri = $this->removeIndexDotPhpAndTrillingSlash($this->getCurrentUri());
        $hasPattern = $this->hasNamedPattern($pattern);
        $pattern = ($hasPattern == false) ? $pattern : $hasPattern;
        if (preg_match_all(
            '#^' . $pattern . '$#',
            $uri,
            $matches,
            PREG_SET_ORDER
        )) {
            return $matches;
        }
    }