public function addUrl(Url $url)
    {
        $this->urls[] = $url;

        $url->setEnvironment($this->getType());

        if ($url->isMain() || !$this->mainUrl) {
            $this->setMainUrl($url);
        }
    }