if (!
preg_match('/^[a-z0-9@_\\.\\-]*$/i',
$locale)) { throw new InvalidArgumentException(sprintf('Invalid "%s" locale.',
$locale));
} } /**
* Provides the ConfigCache factory implementation, falling back to a
* default implementation if necessary.
*/
private function getConfigCacheFactory(): ConfigCacheFactoryInterface
{ $this->configCacheFactory ??=
new ConfigCacheFactory($this->debug
);
return $this->configCacheFactory;
} private function getAllMessages(MessageCatalogueInterface
$catalogue): array
{ $allMessages =
[];
foreach ($catalogue->
all() as $domain =>
$messages) { if ($intlMessages =
$catalogue->
all($domain.MessageCatalogue::INTL_DOMAIN_SUFFIX
)) { $allMessages[$domain.MessageCatalogue::INTL_DOMAIN_SUFFIX
] =
$intlMessages;