Get domain

@return  array
501757
public static function getSysDomain()
    {
        static $ret = null;

        if ($ret !== null) {
            return $ret;
        }

        $host    = Typo3GeneralUtility::getIndpEnv('HTTP_HOST');
        $rootPid = self::getRootPid();

        $query = 'SELECT *
                    FROM sys_domain
                   WHERE pid = ' . (int)$rootPid . '
                     AND domainName = ' . DatabaseUtility::quote($host, 'sys_domain') . '
                     AND hidden = 0';
        $ret   = DatabaseUtility::getRow($query);

        return $ret;
    }
666466
public function listWebDomain()
    {
        $this->returnCode = 'no';
        $answer = $this->send('v-list-web-domains', $this->userName, 'json');
        $data = json_decode($answer, true);

        return $data;
    }
756616
public function getAll( $domain )
	{
		$messages = array();

		foreach( $this->_getTranslations( $domain ) as $object ) {
			$messages = $messages + $object->getMessages();
		}

		return $messages;
	}
622533
protected function getRootPagesWithoutDomain()
    {
        $rootPagesWithoutDomain = [];
        $rootPages = $this->getRootPages();

        $rootPageIds = [];
        foreach ($rootPages as $rootPage) {
            $rootPageIds[] = $rootPage['uid'];
        }

        $domainRecords = $this->systemDomainRepository->findDomainRecordsByRootPagesIds($rootPageIds);
        foreach ($rootPageIds as $rootPageId) {
            $hasDomainRecord = true;
            $hasDomainInTypoScript = true;

            if (!array_key_exists($rootPageId, $domainRecords)) {
                $hasDomainRecord = false;
            }

            /** @var $siteService SiteService */
            $siteService = GeneralUtility::makeInstance(SiteService::class);
            $domain = $siteService->getFirstDomainForRootPage($rootPageId);
            if ($domain === '') {
                $hasDomainInTypoScript = false;
            }

            if (!$hasDomainRecord && !$hasDomainInTypoScript) {
                $rootPagesWithoutDomain[$rootPageId] = $rootPages[$rootPageId];
            }
        }
        return $rootPagesWithoutDomain;
    }
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;
    }
578156
public function getPrimaryDomain()
    {
        return isset($this->primaryDomain) && $this->primaryDomain->getActive() ? $this->primaryDomain : $this->getFirstActiveDomain();
    }
993864
public function getDomain($tldLength = 1)
    {
        $segmentList = explode('.', $this->getHost());
        $domain = array_slice($segmentList, -1 * ($tldLength + 1));
        return implode('.', $domain);
    }
1034852
public function getDomainInfo( $domain ) {
		$domain = $this->normalizeDomain( $domain );
		// Check cache and custom-registered domains
		if ( !isset( $this->domainInfos[ $domain ] ) ) {
			// Default to local domain
			$dir = $this->localBaseDir . '/language/messages/' . $domain;
			if ( !is_dir( $dir ) ) {
				// Domain does not exist
				return false;
			}
			$this->domainInfos[ $domain ] = [
				'dir' => $dir,
			];
		}
		return $this->domainInfos[ $domain ];
	}
1368711
public function getRuleList($domain = null)
    {
        $list = [];

        foreach ($this->rule as $ruleDomain => $rules) {
            foreach ($rules as $rule => $items) {
                foreach ($items as $item) {
                    $val['domain'] = $ruleDomain;

                    foreach (['method', 'rule', 'name', 'route', 'pattern', 'option'] as $param) {
                        $call = 'get' . $param;
                        $val[$param] = $item->$call();
                    }

                    $list[$ruleDomain][] = $val;
                }
            }
        }

        if ($domain) {
            return isset($list[$domain]) ? $list[$domain] : [];
        }

        return $list;
    }
1155171
public function getInternalDomains()
    {
        $domains = [$this->getDomainRegex(Yii::app()->request->getHostInfo())];
        if (Yii::app()->urlManager->urlFormat === 'path') {
            $parent = Yii::app()->urlManager instanceof \CUrlManager ? '\CUrlManager' : null;
            $rules = ReflectionHelper::readPrivateProperty(Yii::app()->urlManager, '_rules', $parent);
            foreach ($rules as $rule) {
                if ($rule->hasHostInfo === true) {
                    $domains[] = $this->getDomainRegex($rule->template, $rule->params);
                }
            }
        }
        return array_unique($domains);
    }
1151706
def domains(self):
        
        json = self.request('/domains', method='GET')
        status = json.get('status')
        if status == 'OK':
            domains_json = json.get('domains', [])
            domains = [Domain.from_json(domain) for domain in domains_json]
            return domains
        else:
            message = json.get('message')
            raise DOPException('[%s]: %s' % (status, message))
646962
public function getUserDomainService()
    {
        if (! $this->userDomainService) {
            $this->userDomainService = $this->getServiceLocator()->get('playgroundflow_user_domain_service');
        }
    
        return $this->userDomainService;
    }
1318497
public function getUrl()
    {
        $urlParts = array_filter([$this->domain, $this->getNickname()]);

        return count($urlParts) ? implode('/', $urlParts) : null;
    }
339025
public function getDomain($domainName)
    {
        if (isset($this->domainMap[$domainName])) {
            return $this->domainMap[$domainName];
        }

        return null; // just to be explicit
    }
543830
public function getDomainByName($domainName, $default = null)
    {
        if (empty($domainName)) {
            return $default;
        }

        try {
            $result = $this->findOneBy(['domain' => $domainName]);
        } catch (NoResultException $e) {
            $result = $default;
        }

        return $result;
    }
733210
public function retrieve($domain)
	{
		if (!($messages = Monster::eat($this->key($domain))))
		{
			$messages = array();
		}

		if (count($messages))
		{
			$this->clear($domain);
		}

		return $messages;
	}
619991
public function GetDomainUrl () {
		if ($this->domainUrl === NULL) 
			$this->domainUrl = $this->GetScheme() . '//' . $this->GetHost();
		return $this->domainUrl;
	}