public function dispatchUri(string $path = null, string $method = null)
    {
        $path = (string)($path ?: $_SERVER['REQUEST_URI']);

        if (\strpos($path, '?')) {
            $path = \parse_url($path, \PHP_URL_PATH);
        }

        // if 'filterFavicon' setting is TRUE
        if ($path === self::FAV_ICON && $this->options['filterFavicon']) {
            return null;
        }

        $method = (string)($method ?: $_SERVER['REQUEST_METHOD']);
        $method = \strtoupper($method);

        /** @var Route $route */
        [$status, $path, $route] = $this->router->match($path, $method);

        return $this->dispatch($status, $path, $method, $route);
    }