protected function makeAbsolute($host, array $arguments = [])
    {
        list($schema, $host) = $this->resolveHost($host);
        $url = $this->buildUrl($arguments);

        $regex = '/^' . str_replace('\{basename\}', '.*', preg_quote($this->host)) . '$/';
        if ($this->host && !preg_match($regex, $host)) {
            $host = str_replace('{basename}', $host, $this->host);
        }

        return ($schema ? $schema . '://' : null) . rtrim($host, '/') . '/' . $url;
    }