public function ArrayLoader::load in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/translation/Loader/ArrayLoader.php \Symfony\Component\Translation\Loader\ArrayLoader::load()
Loads a locale.
Parameters
mixed $resource A resource:
string $locale A locale:
string $domain The domain:
Return value
MessageCatalogue A MessageCatalogue instance
Throws
NotFoundResourceException when the resource cannot be found
InvalidResourceException when the resource cannot be loaded
Overrides LoaderInterface::load
7 calls to ArrayLoader::load()
- CsvFileLoader::load in vendor/
symfony/ translation/ Loader/ CsvFileLoader.php - Loads a locale.
- IniFileLoader::load in vendor/
symfony/ translation/ Loader/ IniFileLoader.php - Loads a locale.
- JsonFileLoader::load in vendor/
symfony/ translation/ Loader/ JsonFileLoader.php - Loads a locale.
- MoFileLoader::load in vendor/
symfony/ translation/ Loader/ MoFileLoader.php - Loads a locale.
- PhpFileLoader::load in vendor/
symfony/ translation/ Loader/ PhpFileLoader.php - Loads a locale.
7 methods override ArrayLoader::load()
- CsvFileLoader::load in vendor/
symfony/ translation/ Loader/ CsvFileLoader.php - Loads a locale.
- IniFileLoader::load in vendor/
symfony/ translation/ Loader/ IniFileLoader.php - Loads a locale.
- JsonFileLoader::load in vendor/
symfony/ translation/ Loader/ JsonFileLoader.php - Loads a locale.
- MoFileLoader::load in vendor/
symfony/ translation/ Loader/ MoFileLoader.php - Loads a locale.
- PhpFileLoader::load in vendor/
symfony/ translation/ Loader/ PhpFileLoader.php - Loads a locale.
File
- vendor/
symfony/ translation/ Loader/ ArrayLoader.php, line 26
Class
- ArrayLoader
- ArrayLoader loads translations from a PHP array.
Namespace
Symfony\Component\Translation\LoaderCode
public function load($resource, $locale, $domain = 'messages') {
$this
->flatten($resource);
$catalogue = new MessageCatalogue($locale);
$catalogue
->add($resource, $domain);
return $catalogue;
}