Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class ClearCacheCommand extends ContainerAwareCommand |
||
15 | { |
||
16 | public function configure() |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * @param InputInterface $input |
||
23 | * @param OutputInterface $output |
||
24 | * |
||
25 | * @return int|null|void |
||
26 | * @throws \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException |
||
27 | */ |
||
28 | public function execute(InputInterface $input, OutputInterface $output) |
||
29 | { |
||
30 | $locales = $this->getManagedLocales(); |
||
31 | $output->writeln('Remove cache for translations in: '.implode(', ', $locales)); |
||
32 | $this->getContainer()->get('translator')->removeLocalesCacheFiles($locales); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @return array |
||
37 | * @throws \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException |
||
38 | * @throws \LogicException |
||
39 | */ |
||
40 | protected function getManagedLocales() |
||
43 | } |
||
44 | } |
||
45 |