class Translator extends Translator implements WarmableInterface
Translator.
| __construct(ContainerInterface $container, MessageFormatterInterface $formatter, string $defaultLocale, array $loaderIds = array(), array $options = array()) Constructor. | ||
| warmUp(string $cacheDir) Warms up the cache. | ||
| addResource($format, $resource, $locale, $domain = null) |
Constructor.
Available options:
| ContainerInterface | $container | A ContainerInterface instance |
| MessageFormatterInterface | $formatter | The message formatter |
| string | $defaultLocale | |
| array | $loaderIds | An array of loader Ids |
| array | $options | An array of options |
| InvalidArgumentException |
Warms up the cache.
| string | $cacheDir | The cache directory |
| $format | ||
| $resource | ||
| $locale | ||
| $domain |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Bundle/FrameworkBundle/Translation/Translator.html