Command/ClearCommand.php
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>");
        }
   }
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>");
        }
   }
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>" ) ; } }
Execute the CLI task

@param InputInterface  $input  Command input
@param OutputInterface $output Command output

@return void
Execute the CLI task