Returns a list of text type items.

@param string $domain Domain the text items must be associated to
@return array List of text type items implementing \Aimeos\MShop\Common\Item\Type\Iface
428548
protected function getTextTypes( $domain )
	{
		if( isset( $this->textTypes[$domain] ) ) {
			return $this->textTypes[$domain];
		}

		$this->textTypes[$domain] = [];

		$textManager = \Aimeos\MShop\Text\Manager\Factory::createManager( $this->getContext() );
		$manager = $textManager->getSubManager( 'type' );

		$search = $manager->createSearch();
		$search->setConditions( $search->compare( '==', 'text.type.domain', $domain ) );
		$search->setSortations( array( $search->sort( '+', 'text.type.code' ) ) );

		$start = 0;

		do
		{
			$result = $manager->searchItems( $search );

			$this->textTypes[$domain] = array_merge( $this->textTypes[$domain], $result );

			$count = count( $result );
			$start += $count;
			$search->setSlice( $start );
		}
		while( $count > 0 );

		return $this->textTypes[$domain];
	}
383569
public function getIndex( $item )
	{
		$index	= array_search( $item, $this->list );
		if( $index === FALSE )
			throw new DomainException( 'Item "'.$item.'" is not in List.' );
		return $index;
	}
809424
public static function get_short_fqdn_from_domain($domain)
    {
        \FileLogger::debug('Calling get_short_fqdn_from_email with email domain = '.$domain);
        $ent_arr = explode('.', $domain);
        //remove last element
        array_pop($ent_arr);
        return implode('.', $ent_arr);
    }
545529
public static function domainToASCII($domain)
    {
        return mb_strlen($domain, 'UTF-8') <= self::PHP_IDN_HANDLEABLE_LENGTH
            ? idn_to_ascii($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46)
            : false;
    }
427528
public function getAllByLocaleAndDomain($locale, $domain)
    {
        return $this->createQueryBuilder('tu')
            ->select('tu, te')
            ->leftJoin('tu.translations', 'te')
            ->where('tu.domain = :domain')
            ->andWhere('te.locale = :locale')
            ->setParameter('domain', $domain)
            ->setParameter('locale', $locale)
            ->getQuery()
            ->getArrayResult();
    }
270091
public function getTranslator($domain = '')
    {
        if (empty($domain)) {
            $domain = $this->default_domain;
        }

        if (! isset($this->domains[$this->locale])) {
            $this->domains[$this->locale] = [];
        }

        if (! isset($this->domains[$this->locale][$domain])) {
            if (isset($this->paths[$domain])) {
                $base = $this->paths[$domain];
            } else {
                $base = './';
            }

            $locale_names = $this->listLocales($this->locale);

            $filename = '';
            foreach ($locale_names as $locale) {
                $filename = "$base/$locale/LC_MESSAGES/$domain.mo";
                if (file_exists($filename)) {
                    break;
                }
            }

            // We don't care about invalid path, we will get fallback
            // translator here
            $this->domains[$this->locale][$domain] = new Translator($filename);
        }

        return $this->domains[$this->locale][$domain];
    }
429492
protected function getTranslations( $domain )
	{
		if( !isset( $this->files[$domain] ) )
		{
			if ( !isset( $this->sources[$domain] ) )
			{
				$msg = sprintf( 'No translation directory for domain "%1$s" available', $domain );
				throw new \Aimeos\MW\Translation\Exception( $msg );
			}

			// Reverse locations so the former gets not overwritten by the later
			$locations = array_reverse( $this->getTranslationFileLocations( $this->sources[$domain], $this->getLocale() ) );

			foreach( $locations as $location ) {
				$this->files[$domain][$location] = new \Aimeos\MW\Translation\File\Mo( $location );
			}
		}

		return ( isset( $this->files[$domain] ) ? $this->files[$domain] : [] );
	}
918304
public function getComponents($domain = null)
    {
        $components = $result = array_keys($this->_components);

        if($domain)
        {
            foreach($components as $key => $component)
            {
                if(strpos($component, 'com://'.$domain) === false) {
                    unset($components[$key]);
                }
            }
        }

        return $components;
    }
309613
public function getRoles($domain = false, $expanded = true)
    {
        $roles = [];

        if (!$this->tokenStorage->getToken()) {
            return $roles;
        }

        $this->iterateAdminRoles(function ($role, $isMaster) use ($domain, &$roles): void {
            if ($isMaster) {
                // if the user has the MASTER permission, allow to grant access the admin roles to other users
                $roles[$role] = $this->translateRole($role, $domain);
            }
        });

        $isMaster = $this->authorizationChecker->isGranted(
            $this->pool->getOption('role_super_admin', 'ROLE_SUPER_ADMIN')
        );

        // get roles from the service container
        foreach ($this->rolesHierarchy as $name => $rolesHierarchy) {
            if ($this->authorizationChecker->isGranted($name) || $isMaster) {
                $roles[$name] = $this->translateRole($name, $domain);
                if ($expanded) {
                    $result = array_map([$this, 'translateRole'], $rolesHierarchy, array_fill(0, \count($rolesHierarchy), $domain));
                    $roles[$name] .= ': '.implode(', ', $result);
                }
                foreach ($rolesHierarchy as $role) {
                    if (!isset($roles[$role])) {
                        $roles[$role] = $this->translateRole($role, $domain);
                    }
                }
            }
        }

        return $roles;
    }
369241
public function retrieve($domain)
	{
		$key = $this->key($domain);

		$messages = isset($this->messages[$key]) ? $this->messages[$key] : array();

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

		return $messages;
	}
73174
public static function domainToUnicode($domain)
    {
        return mb_strlen($domain, 'UTF-8') <= self::PHP_IDN_HANDLEABLE_LENGTH
            ? idn_to_utf8($domain, 0, INTL_IDNA_VARIANT_UTS46)
            : false;
    }
808979
private function getTranslationFilesFromConfiguration($domain, $locale)
    {
        $filteredFilenames = array();

        foreach ($this->translationFilesByLocale as $localeFromConfig => $resourceFilePaths) {
            foreach ($resourceFilePaths as $filename) {
                list($currentDomain, $currentLocale) = explode('.', basename($filename), 3);

                if ($currentDomain === $domain && $currentLocale === $locale) {
                    $filteredFilenames[] = $filename;
                }
            }
        }
        return $filteredFilenames;
    }
1322664
function get_domain_id($domain)
    {
        $xml = $this->domain_info($domain);
        $id  = intval($xml->site->get->result->id);
        $id  = (is_int($id)) ? $id : false;

        return $id;
    }
1304665
public static function getDomain($emails): array
    {
        $result = [];

        if (empty($emails)) {
            return $result;
        }

        $emails = self::handleEmailsInput($emails);

        foreach ($emails as $email) {
            if (!self::isValid($email)) {
                continue;
            }

            $domain = self::extractDomain($email);
            if (!empty($domain) && !in_array($domain, $result, true)) {
                $result[] = $domain;
            }
        }

        return $result;
    }
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);
    }
30224
protected function _getTranslations( $domain )
	{
		if( !isset( $this->_translations[$domain] ) )
		{
			if ( !isset( $this->_translationSources[$domain] ) )
			{
				$msg = sprintf( 'No translation directory for domain "%1$s" available', $domain );
				throw new MW_Translation_Exception( $msg );
			}

			// Reverse locations so the former gets not overwritten by the later
			$locations = array_reverse( $this->_getTranslationFileLocations( $this->_translationSources[$domain], $this->getLocale() ) );
			$options = $this->_options;

			foreach( $locations as $location )
			{
				$options['content'] = $location;
				$this->_translations[$domain][] = new Zend_Translate( $options );
			}
		}

		return ( isset( $this->_translations[$domain] ) ? $this->_translations[$domain] : array() );
	}
165363
public static function getXDomainId($domain)
	{
		$db = \App::get('db');

		if (empty($domain) || ($domain == 'hubzero'))
		{
			return false;
		}

		$query = 'SELECT domain_id FROM `#__xdomains` WHERE domain=' . $db->quote($domain) . ';';
		$db->setQuery($query);

		$result = $db->loadObject();

		if (empty($result))
		{
			return false;
		}

		return $result->domain_id;
	}