Ejemplo n.º 1
0
 /**
  * Execute the CLI task
  *
  * @param InputInterface  $input  Command input
  * @param OutputInterface $output Command output
  *
  * @return void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $pool = $input->getArgument('pool');
     try {
         $this->memcache = $this->getContainer()->get('memcache.' . $pool);
         $output->writeln($this->memcache->flush() ? '<info>OK</info>' : '<error>ERROR</error>');
     } catch (ServiceNotFoundException $e) {
         $output->writeln("<error>pool '{$pool}' is not found</error>");
     }
 }