getDomainByName

@param string $domainName
@param null   $default

@return null|object
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;
    }
527792
public function getTextdomain()
    {
        $textDomain = Strata::app()->getConfig("i18n.textdomain");
        return is_null($textDomain) ? self::DOMAIN : $textDomain;
    }
1281751
public function loadDomainCode(string $domainName)
    {
        $domainClassName = DomainActionNameGenerator::getDomainClassName($domainName);

        return $this->load($this->domainsPath . "/" . $domainClassName.".php");
    }
362576
public function get($name, $default = null)
    {
        $name = $this->prefix . $name;
        return isset($_COOKIE[$name]) ? $_COOKIE[$name] : $default;
    }
479482
public function get ($name, $default = null)
		{
			foreach ($this->_data as $d)
			{
				if ($d->name === $name)
					return $d->value;
			}

			return $default;
		}
187994
public function get($name, $default = null)
    {
        return isset($this->requestCookies[$name]) ? $this->requestCookies[$name] : $default;
    }
1103109
protected function getDomain(?string $domain = null) : ?string
    {
        $domain = $domain ?? $this->appUrl;

        if ($domain === null) {
            return null;
        }

        return $this->trim(str_replace(['http:', 'https:'], '', $domain), '/');
    }
1220533
public function getRegistrableDomain()
    {
        if (null === $this->suffix) {
            return null;
        }

        return null === $this->hostname ? null : $this->hostname . '.' . $this->suffix;
    }
80649
public static function getByDomain($domain)
    {
        // Map true -> actual domain
        if ($domain === true) {
            $state = FluentState::singleton();
            $domain = $state->getIsDomainMode() ? $state->getDomain() : null;
        }

        // No domain found
        if (!$domain) {
            return null;
        }

        if ($domain instanceof Domain) {
            return $domain;
        }

        // Get filtered domain
        return static::getCached()
            ->filter('Domain', $domain)
            ->first();
    }
706481
public function setDomainname(string $domainname)
    {
        $this->domainname = $domainname;

        $this->raw = array_merge($this->raw, ['Domainname' => $domainname]);

        return $this;
    }
62511
public static function getSecondDomain() {
        $serverName = filter_input(INPUT_SERVER, 'SERVER_NAME');
        $serverArr = explode('.', $serverName);
        $domain = array_shift($serverArr);

        return $domain;
    }
103112
public function domain($domain = null)
    {
        deprecationWarning('Email::domain() is deprecated. Use Email::setDomain() or Email::getDomain() instead.');

        if ($domain === null) {
            return $this->getDomain();
        }

        return $this->setDomain($domain);
    }
839800
protected function getPrimaryDomain($domain)
    {
        /** @var \Rcm\Entity\Domain $domain */
        $domain = $this->_em->getRepository(\Rcm\Entity\Domain::class)
            ->findOneBy(['domain' => $domain]);

        if (empty($domain)) {
            return null;
        }

        $primary = $domain->getPrimary();

        if (!$primary->getPrimary()) {
            return $primary;
        }

        return $this->getPrimaryDomain($primary->getDomainName());
    }
1339730
public function getDomainName(): string
    {
        return $this->myDomainParts[count($this->myDomainParts) - 1] . ($this->myTld !== null ? '.' . $this->myTld : '');
    }
736316
public function getTags($tagName = null) {
		return $this->tags->filter(function ($tag) use ($tagName) {
			return $tagName === null || $tag->getTagName() == $tagName;
		});
	}
1344477
public function getValueByName(string $name, $default = null)
    {
        if (isset($this->values[$name])) {
            return $this->parseType($this->values[$name]);
        }

        return $default;
    }
150245
public static function get($name = null, $default = false)
	{
		if(isset(self::$modifys[$name]))
		{
			return self::$modifys[$name];
		}
		else if(array_key_exists($name,self::$modifys))
		{
			return $default;
		}
		else
		{
			self::init();
			self::save();
			if(null === $name)
			{
				return $_SESSION;
			}
			$names = parseCfgName($name);
			$var = $_SESSION;
			foreach($names as $name)
			{
				if('@' === $name)
				{
					$name = self::$prefix;
				}
				if('' !== $name)
				{
					$var = $var[$name];
				}
			}
			return isset($var) ? $var : $default;
		}
	}