private function urlGen($url)
    {
        if (empty($url) && empty($this->url)) {
            throw new \Exception("URL not set!", 1);
        }
        return empty($url) ? $this->url : $url;
    }