private function addRoute($method, $uri, $controller, $action)
    {
        // Prefix route uri, concat it and clear
        if (strlen($this->prefixUri) > 0) {
            $uri = $this->prefixUri . $uri;
            $this->prefixUri = '';
        }

        // Compatible: has no namespace
        if (strrpos($controller, '\\', 1) === false) {
            $controller = 'App\\Controllers\\' . $controller;
        }

        $items = $uri ? explode('/', ltrim($uri, '/')) : [];

        $this->routes[] = [
            'method'     => $method,
            'count'      => count($items),
            'controller' => $controller,
            'action'     => $action,
            'params'     => $items,
        ];
    }