comparison vendor/symfony/translation/DataCollectorTranslator.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
9 * file that was distributed with this source code. 9 * file that was distributed with this source code.
10 */ 10 */
11 11
12 namespace Symfony\Component\Translation; 12 namespace Symfony\Component\Translation;
13 13
14 use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface;
14 use Symfony\Component\Translation\Exception\InvalidArgumentException; 15 use Symfony\Component\Translation\Exception\InvalidArgumentException;
15 16
16 /** 17 /**
17 * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> 18 * @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
18 */ 19 */
19 class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInterface 20 class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInterface, WarmableInterface
20 { 21 {
21 const MESSAGE_DEFINED = 0; 22 const MESSAGE_DEFINED = 0;
22 const MESSAGE_MISSING = 1; 23 const MESSAGE_MISSING = 1;
23 const MESSAGE_EQUALS_FALLBACK = 2; 24 const MESSAGE_EQUALS_FALLBACK = 2;
24 25
83 * {@inheritdoc} 84 * {@inheritdoc}
84 */ 85 */
85 public function getCatalogue($locale = null) 86 public function getCatalogue($locale = null)
86 { 87 {
87 return $this->translator->getCatalogue($locale); 88 return $this->translator->getCatalogue($locale);
89 }
90
91 /**
92 * {@inheritdoc}
93 */
94 public function warmUp($cacheDir)
95 {
96 if ($this->translator instanceof WarmableInterface) {
97 $this->translator->warmUp($cacheDir);
98 }
88 } 99 }
89 100
90 /** 101 /**
91 * Gets the fallback locales. 102 * Gets the fallback locales.
92 * 103 *