protected function parse($uri, array $pairs)
    {
        $path = $this->getPathFromUri($uri);
        $result = [];
        foreach ($pairs as $param => $paths) {
            if ((
                    strpos($uri, "?$param=") ||
                    strpos($uri, "&$param=")
                ) &&
                $this->checkPaths($path, $paths) !== false
            ) {
                $result[] = $param;
            }
        }
        sort($result);
        return $result;
    }