setName('redis:test') ->setDescription('Test Redis') ->setHelp('This command allows test redis') ; } /** * @param InputInterface $input * @param OutputInterface $output */ protected function execute(InputInterface $input, OutputInterface $output) { /* @var $statsDeviceManager DeviceManager */ $redis = $this->getContainer()->get('redis'); //$parameters = ['tcp://127.0.0.1:6379']; //$redis->setOptions($options); //$redis->setConnection($parameters); $value = $redis->getString('clave',true); $output->writeln($value); } }