Ouzo\Routing\RouteRule::match PHP Метод

match() приватный Метод

private match ( $uri )
    private function match($uri)
    {
        preg_match('#/.+?/(.+?)(/|$)#', $uri, $matches);
        if ($this->isInExceptActions(Arrays::getValue($matches, 1, ''))) {
            return false;
        }
        $definedUri = $this->getUri();
        if ($definedUri == $uri) {
            return true;
        }
        if (strstr($definedUri, ':') !== false) {
            $replacedUri = preg_replace('#:[\\w@]*#u', '[\\w.\\-~_%@ ]+', $definedUri);
            return preg_match('#^' . $replacedUri . '$#u', $uri);
        }
        if (!$this->action) {
            return preg_match('#' . $definedUri . '/#u', $uri);
        }
        return false;
    }