Define o "Domain" do cookie.

O valor "null" irá remover esta propriedade do cookie.

@param       ?string $domain
Domain.

@return      void
775895
public function setDomain(?string $domain) : void
    {
        $this->domain = (($domain === null) ? null : strtolower($domain));
    }
739842
public function setDomain($domain = self::DEFAULT_DOMAIN)
    {
        $this->domain = $domain;
        if (isset($this->config[$this->domain]) && !empty($this->config[$this->domain])) {
            $this->codes = $this->config[$this->domain];
        } else {
            $this->codes  = $this->config[self::DEFAULT_DOMAIN];
            $this->domain = self::DEFAULT_DOMAIN;
        }
        return $this;
    }
1363810
public function deactivateDomainAction(Domain $domain)
    {
        $domain->setActive(false);
        $this->domainRepository->update($domain);
        $this->addFlashMessage('The domain "%s" has been deactivated.', 'Domain deactivated', Message::SEVERITY_OK, [htmlspecialchars($domain)], 1412373425);
        $this->unsetLastVisitedNodeAndRedirect('edit', null, null, ['site' => $domain->getSite()]);
    }
862887
protected function _matchDomain($domain) 
    {
        $ret = array();

        foreach (array_keys($this->cookies) as $cdom) {
            $regex = "/" . preg_quote($cdom, "/") . "$/i";
            if (preg_match($regex, $domain)) { $ret[$cdom] = &$this->cookies[$cdom];
            }
        }

        return $ret;
    }
658262
public function store($data, $domain)
	{
		$messages   = (array) $this->retrieve($domain);
		$messages[] = $data;

		$this->session->set($this->key($domain), $messages);
	}
890366
public function updateDomainAction(Domain $domain)
    {
        $this->domainRepository->update($domain);
        $this->addFlashMessage('The domain "%s" has been updated.', 'Domain updated', Message::SEVERITY_OK, [htmlspecialchars($domain)], 1412373069);
        $this->unsetLastVisitedNodeAndRedirect('edit', null, null, ['site' => $domain->getSite()]);
    }
1338989
public function isIgnoredDomain($domain)
    {
        if ($ignoreRegexes = $this->config()->get('ignore_domain_regexes')) {
            foreach ($ignoreRegexes as $ignore) {
                if (preg_match($ignore, $domain) > 0) {
                    return true;
                }
            }
        }

        return false;
    }
1220198
protected function markAsInitialized($locale, $domain) {
		if (! isset($this->initializedCatalogs[$locale])) {
			$this->initializedCatalogs[$locale] = [];
		}

		$this->initializedCatalogs[$locale][$domain] = true;
	}
220565
protected function stripProtocol($domain)
    {
        if (Str::contains($domain, '://')) {
            $domain = \substr($domain, \strpos($domain, '://') + 3);
        }

        return $domain;
    }
848957
public function newDomainAction(Domain $domain = null, Site $site = null)
    {
        $this->view->assignMultiple([
            'domain' => $domain,
            'site' => $site,
            'schemes' => [null => '', 'http' => 'HTTP', 'https' => 'HTTPS']
        ]);
    }
948572
private function set_domain_results($users, $domain, $val)
        {
            if (!Arrays::is($users)) {
                $users = (array) $users;
            }
            foreach ($users as $user) {
                $this->results[$user . '@' . $domain] = $val;
            }
        }
294259
public function getCookie($key, $domain = '-')
    {
        $domain = strtolower($domain);
        if ($key === null) {
            $cookies = [];
        }
        while (true) {
            if (isset($this->_cookies[$domain])) {
                foreach ($this->_cookies[$domain] as $path => $list) {
                    if ($key === null) {
                        $cookies = array_merge($list, $cookies);
                    } else {
                        if (isset($list[$key])) {
                            return rawurldecode($list[$key]['value']);
                        }
                    }
                }
            }
            if (($pos = strpos($domain, '.', 1)) === false) {
                break;
            }
            $domain = substr($domain, $pos);
        }
        return $key === null ? $cookies : null;
    }
1173210
public function setDomain($domain)
    {
        try {
            $this->domain = (string) $domain;
        } catch (Exception $e) {
            throw new InvalidArgumentException(
                'Value provided as domain is not a string'
            );
        }

        return $this;
    }
52210
public function validationDomain($domain = null)
    {
        if ($domain === null) {
            return $this->_validationDomain;
        }
        $this->_validationDomain = $domain;
    }
314395
public function remove(Cookie $cookie) {
        unset($this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()]);
    }
1260609
public function remove($domain)
    {
        if (!$this->has($domain)) {
            throw new \InvalidArgumentException(sprintf(
                'Cannot remove the "%s" filesystem as it is not defined.',
                $domain
            ));
        }

        unset($this->filesystems[$domain]);
    }
1252124
public function addDomain(Domain $domain)
    {
        if ($this->domains->contains($domain)) {
            return $this;
        }

        $this->domains[] = $domain;

        return $this;
    }