public function root($uri = null, $version = false)
    {
        if ($version === true) {
            $version = $this->getVersion();
        }

        if ($version) {
            if (strpos($uri, '?') !== false) {
                $uri .= '&' . $version;
            } else {
                $uri .= '?' . $version;
            }
        }

        if ($uri !== null) {
            return $this->root . '/' . $uri;
        }

        return $this->root;
    }