Get Repositories.

@param array $domains
@param array $languages

@return Repository[]
979343
public function getRepositories(
        array $domains = [],
        array $languages = []
    ) : array {
        $repositories = array_filter(
            $this->repositories,
            function (Repository $repository) use ($domains) {
                return
                    empty($domains) ||
                    in_array($repository->getDomain(), $domains);
            }
        );

        return array_filter(
            $repositories,
            function (Repository $repository) use ($languages) {
                return
                    empty($languages) ||
                    in_array($repository->getLanguage(), $languages);
            }
        );
    }
1236933
public function addDomain(DomainConfiguration ...$domains)
    {
        foreach ($domains as $domain) {
            $this->domains[$domain->getDomainName()] = $domain;
        }

        return $this;
    }
919577
public function listRepositoryEvents(): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues/events',
            $this->getIssues()->getOwner(), $this->getIssues()->getRepo()));
    }
617409
public function getResourcePaths($domain = null) {
        return isset($this->_paths[$domain]) ? $this->_paths[$domain] : $this->_paths;
    }
356862
public function getTranslations(
        array $domains = [],
        array $languages = [],
        callable $filter = null
    ) : array {
        return $this
            ->repositoryCollection
            ->getTranslations(
                $domains,
                $languages,
                $filter
            );
    }
288874
public function getCatalogs($locale = null, $domain = null) {
		$cache = $this->getCacheFrontend();
		
		if (is_array($domain)) {
			$catalogs = $cache->getMany($domain);
			
			if (empty($catalogs)) {
				return;
			}
			
			return call_user_func_array('array_replace_recursive', $catalogs);
		}
		
		return $cache->get($domain);
	}
733210
public function retrieve($domain)
	{
		if (!($messages = Monster::eat($this->key($domain))))
		{
			$messages = array();
		}

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

		return $messages;
	}
362683
private function getMessages(MessageCatalogueInterface $catalogue, string $domain, array $keys)
    {
        $current = $catalogue;
        $previous = [];
        $messages = [];

        while ($current !== null) {
            $all = $current->all($domain);

            if (count($keys) === 0 || in_array('*', $keys)) {
                $currentMessages = array_diff_key($all, $previous);
            } else {
                $currentMessages = [];

                foreach ($keys as $key) {
                    if (substr($key, -1) === '*') {
                        $currentMessages += $this->findWildcardMessages($key, $all, $previous);
                    } else if (!array_key_exists($key, $previous) && array_key_exists($key, $all)) {
                        $currentMessages[$key] = $all[$key];
                    }
                }
            }

            $messages[$current->getLocale()] = $previous = $currentMessages;
            $current = $current->getFallbackCatalogue();
        }

        return $messages;
    }
795480
public static function getDisplayLanguages($languages, $languageRedirects)
    {
        foreach ($languages as $key => $value) {
            $key = (isset($languageRedirects[$key])) ? $languageRedirects[$key] : $key;
            $redirects[$key] = $value;
        }
        return $redirects;
    }
1166369
public static function getRelationsConfig(string $domain, string $id) : array {
		$repositoryEntity = \App::$domain->get($domain)->repositories->get($id);
		$relations =  $repositoryEntity->relations();
		$relations = self::normalizeConfig($relations);
		$relationsCollection = Helper::forgeEntity($relations, RelationEntity::class, true, true);
		return $relationsCollection;
	}
979637
protected function createRepositories(array $repositories = null)
    {
        if (null !== $repositories) {
            foreach ($repositories as $index => $repository) {
                $repositories[$index] = $this->createRepository(
                    new ObjectAccess($repository)
                );
            }
        }

        return $repositories;
    }
1120105
@SuppressWarnings("unchecked")
    public <REPO extends I_CmsRepository> List<REPO> getRepositories(Class<REPO> cls) {

        List<REPO> result = new ArrayList<REPO>();
        for (I_CmsRepository repo : m_repositoryMap.values()) {
            if (cls.isInstance(repo)) {
                result.add((REPO)repo);
            }
        }
        return result;
    }
128252
public function getCatalogs($locale = null, $domain = null) {
		$cache = $this->getCacheFrontend();
		
		if (is_array($locale)) {
			$catalogs = $cache->getMany($locale);
			
			return empty($catalogs) ? null : $catalogs;
		}
		
		$catalogs = $cache->get($locale);
		
		if ($catalogs === null) {
			return;
		}
		
		return [$locale => $catalogs];
	}
1371030
public static function apps(): array
    {
        self::initialize();
        $apps = [];
        foreach (self::$repositories as $name => $repository) {
            $apps[] = $name;
        }
        return $apps;
    }
1047276
public function getPages(Website $website, $pageIds, $isAdmin, $isAPI)
    {
        if (!is_array($pageIds)) {
            $pageIds = [$pageIds];
        }
        $pages = $this->pageRepository->findPages($website, $pageIds, $isAdmin, $isAPI);

        return $pages;
    }
942467
public function getAllLangs(): array
    {
        $domainInfo = $this->intuition->getDomainInfo($this->domain);
        $messageFiles = glob($domainInfo['dir'].'/*.json');
        $languages = array_values(array_unique(array_map(
            function ($filename) {
                return basename($filename, '.json');
            },
            $messageFiles
        )));
        $availableLanguages = [];
        foreach ($languages as $lang) {
            $availableLanguages[$lang] = $this->intuition->getLangName($lang);
        }
        ksort($availableLanguages);
        return $availableLanguages;
    }
1161870
public function findForLocalesAndDomains(array $locales, array $domains)
    {
        return FileQuery::create()
            ->_if(count($locales) > 0)
                ->filterByLocale($locales, Criteria::IN)
            ->_endif()

            ->_if(count($domains) > 0)
                ->filterByDomain($domains, Criteria::IN)
            ->_endif()

            ->find($this->getConnection())
        ;
    }