| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 6 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 38 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 39 | { |
||
| 40 | $container = $this->getContainer(); |
||
| 41 | $memcached = $container->get('uber.memcached'); // get uber memcached |
||
| 42 | $keys = $container->getParameter('sleepness_uber_translation.supported_locales'); |
||
| 43 | foreach ($keys as $index => $locale) { |
||
| 44 | if (!preg_match('/^[a-z]{2}_[a-zA-Z]{2}$|[a-z]{2}/', $locale)) { |
||
| 45 | continue; |
||
| 46 | } |
||
| 47 | $response = $memcached->deleteItem($locale) ? "\033[37;42m Translations for " . $locale . " locale deleted from Memcache! \033[0m" |
||
| 48 | : "\033[37;43m Data with " . $locale . " locale has not been deleted from Memcache! \033[0m"; |
||
| 49 | $output->writeln($response); |
||
| 50 | } |
||
| 51 | } |
||
| 52 | } |
||
| 53 |